diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-01-04 03:15:49 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-01-04 03:15:49 +0000 |
commit | 3557acfd22c53721e315f88417d3469a0d0aac83 (patch) | |
tree | 64bbb4684d63fcd6973460c1413f47c4d8e9b3af | |
parent | 69534c29692829c756193009eb1fca84ae7012aa (diff) | |
download | portage-3557acfd22c53721e315f88417d3469a0d0aac83.tar.gz portage-3557acfd22c53721e315f88417d3469a0d0aac83.tar.bz2 portage-3557acfd22c53721e315f88417d3469a0d0aac83.zip |
When dropping privileges inside action_sync(), set the umask to preserve
the group write bit if appropriate.
svn path=/main/trunk/; revision=12380
-rw-r--r-- | pym/_emerge/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 110c63630..d728d64fc 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -11821,6 +11821,10 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): spawn_kwargs["gid"] = st.st_gid spawn_kwargs["groups"] = [st.st_gid] spawn_kwargs["env"]["HOME"] = homedir + umask = 0002 + if not st.st_mode & 0020: + umask = umask | 0020 + spawn_kwargs["umask"] = umask syncuri = settings.get("SYNC", "").strip() if not syncuri: |