From: Zac Medico Date: Sun, 4 Jan 2009 03:15:49 +0000 (-0000) Subject: When dropping privileges inside action_sync(), set the umask to preserve X-Git-Tag: v2.2_rc21~43 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3557acfd22c53721e315f88417d3469a0d0aac83;p=portage.git When dropping privileges inside action_sync(), set the umask to preserve the group write bit if appropriate. svn path=/main/trunk/; revision=12380 --- 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: