summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-11-03 23:43:31 +0000
committerZac Medico <zmedico@gentoo.org>2007-11-03 23:43:31 +0000
commit79c8f649ff319f22479a3378bdf9566ccc5b0128 (patch)
tree56d81bc1a226c4334553fa0d8e4d458afc7068ab
parent0437e79e58ae33acde15c7a999f7c20204fed593 (diff)
downloadportage-79c8f649ff319f22479a3378bdf9566ccc5b0128.tar.gz
portage-79c8f649ff319f22479a3378bdf9566ccc5b0128.tar.bz2
portage-79c8f649ff319f22479a3378bdf9566ccc5b0128.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(). svn path=/main/trunk/; revision=8408
-rw-r--r--pym/portage/dbapi/vartree.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 291452f22..8adab4696 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -2000,10 +2000,7 @@ class dblink(object):
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)
+ ensure_dirs(my_private_path, gid=portage_gid, mode=02750, mask=02)
writedict(cfgfiledict, conf_mem_file)
del conf_mem_file