When dropping privileges inside action_sync(), set the umask to preserve
authorZac Medico <zmedico@gentoo.org>
Mon, 12 Jan 2009 08:14:04 +0000 (08:14 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 12 Jan 2009 08:14:04 +0000 (08:14 -0000)
the group write bit if appropriate. (trunk r12380)

svn path=/main/branches/2.1.6/; revision=12450

pym/_emerge/__init__.py

index 4ea4a3d090b6e320d4e75757b2db1d6e023b5e56..f28baffea26b5cab7224f7d68160df76edf625b1 100644 (file)
@@ -11645,6 +11645,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: