Note: Due to technical difficulties, the Archives are currently not up to date.
GMANE provides an alternative service for most mailing lists. c.f. bug 424647
List Archive: gentoo-commits
Author: zmedico
Date: 2009-01-13 21:27:30 +0000 (Tue, 13 Jan 2009)
New Revision: 12496
Modified:
main/trunk/man/make.conf.5
main/trunk/pym/_emerge/__init__.py
Log:
Use a new 'usersync' feature to control dropping of privileges for --sync,
since it's fairly common for people to have inconsistent permissions between
$PORTDIR and contained files/directories.
Modified: main/trunk/man/make.conf.5
===================================================================
--- main/trunk/man/make.conf.5 2009-01-13 21:02:30 UTC (rev 12495)
+++ main/trunk/man/make.conf.5 2009-01-13 21:27:30 UTC (rev 12496)
@@ -360,6 +360,10 @@
.B usersandbox
Enable the sandbox in the compile phase, when running without root privs (\fIuserpriv\fR).
.TP
+.B usersync
+Drop privileges to the owner of \fBPORTDIR\fR for \fBemerge(1) --sync\fR
+operations.
+.TP
.B webrsync-gpg
Enable GPG verification when using \fIemerge\-webrsync\fR.
.RE
Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py 2009-01-13 21:02:30 UTC (rev 12495)
+++ main/trunk/pym/_emerge/__init__.py 2009-01-13 21:27:30 UTC (rev 12496)
@@ -12068,7 +12068,8 @@
spawn_kwargs = {}
spawn_kwargs["env"] = settings.environ()
- if portage.data.secpass >= 2 and \
+ if 'usersync' in settings.features and \
+ portage.data.secpass >= 2 and \
(st.st_uid != os.getuid() and st.st_mode & 0700 or \
st.st_gid != os.getgid() and st.st_mode & 0070):
try:
|
|