1 |
Author: zmedico |
2 |
Date: 2009-01-13 21:27:30 +0000 (Tue, 13 Jan 2009) |
3 |
New Revision: 12496 |
4 |
|
5 |
Modified: |
6 |
main/trunk/man/make.conf.5 |
7 |
main/trunk/pym/_emerge/__init__.py |
8 |
Log: |
9 |
Use a new 'usersync' feature to control dropping of privileges for --sync, |
10 |
since it's fairly common for people to have inconsistent permissions between |
11 |
$PORTDIR and contained files/directories. |
12 |
|
13 |
|
14 |
Modified: main/trunk/man/make.conf.5 |
15 |
=================================================================== |
16 |
--- main/trunk/man/make.conf.5 2009-01-13 21:02:30 UTC (rev 12495) |
17 |
+++ main/trunk/man/make.conf.5 2009-01-13 21:27:30 UTC (rev 12496) |
18 |
@@ -360,6 +360,10 @@ |
19 |
.B usersandbox |
20 |
Enable the sandbox in the compile phase, when running without root privs (\fIuserpriv\fR). |
21 |
.TP |
22 |
+.B usersync |
23 |
+Drop privileges to the owner of \fBPORTDIR\fR for \fBemerge(1) --sync\fR |
24 |
+operations. |
25 |
+.TP |
26 |
.B webrsync-gpg |
27 |
Enable GPG verification when using \fIemerge\-webrsync\fR. |
28 |
.RE |
29 |
|
30 |
Modified: main/trunk/pym/_emerge/__init__.py |
31 |
=================================================================== |
32 |
--- main/trunk/pym/_emerge/__init__.py 2009-01-13 21:02:30 UTC (rev 12495) |
33 |
+++ main/trunk/pym/_emerge/__init__.py 2009-01-13 21:27:30 UTC (rev 12496) |
34 |
@@ -12068,7 +12068,8 @@ |
35 |
|
36 |
spawn_kwargs = {} |
37 |
spawn_kwargs["env"] = settings.environ() |
38 |
- if portage.data.secpass >= 2 and \ |
39 |
+ if 'usersync' in settings.features and \ |
40 |
+ portage.data.secpass >= 2 and \ |
41 |
(st.st_uid != os.getuid() and st.st_mode & 0700 or \ |
42 |
st.st_gid != os.getgid() and st.st_mode & 0070): |
43 |
try: |