summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-11-03 23:49:19 +0000
committerZac Medico <zmedico@gentoo.org>2007-11-03 23:49:19 +0000
commitcfc02358de84991733fa56eeef668fa5416c986c (patch)
tree9217ac3642e6b3879007ebbaee63616b709b19f6
parent56e6d5236745d17c45d3b1434d9c147bc797b9e5 (diff)
downloadportage-cfc02358de84991733fa56eeef668fa5416c986c.tar.gz
portage-cfc02358de84991733fa56eeef668fa5416c986c.tar.bz2
portage-cfc02358de84991733fa56eeef668fa5416c986c.zip
Bug #197797 - Do not actively clear o+rx permission bits
on the /var/lib/portage directory. Only clear the o+w bits. This allows users who aren't in the portage group to have read access to the world file by default, but administrators can explicitly chmod o-rx that directory if necessary, and portage will leave those bits alone. This makes the permission settings in dblink.treewalk() consistent with those that are already defined in config._init_dirs(). (trunk r8408) svn path=/main/branches/2.1.2/; revision=8409
-rw-r--r--pym/portage.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 89d59812a..efe65c5a3 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -8484,10 +8484,8 @@ class dblink:
del cfgfiledict["IGNORE"]
my_private_path = os.path.join(destroot, PRIVATE_PATH)
- if not os.path.exists(my_private_path):
- os.makedirs(my_private_path)
- os.chown(my_private_path, os.getuid(), portage_gid)
- os.chmod(my_private_path, 02770)
+ portage_util.ensure_dirs(
+ my_private_path, gid=portage_gid, mode=02750, mask=02)
writedict(cfgfiledict, conf_mem_file)
del conf_mem_file