Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 137610
Collapse All | Expand All

(-)pym/portage_data.py (+9 lines)
Lines 3-8 Link Here
3
# Distributed under the terms of the GNU General Public License v2
3
# Distributed under the terms of the GNU General Public License v2
4
# $Id$
4
# $Id$
5
5
6
if not hasattr(__builtins__, "set"):
7
	from sets import Set as set
6
8
7
import os,pwd,grp
9
import os,pwd,grp
8
from portage_util import writemsg
10
from portage_util import writemsg
Lines 107-109 Link Here
107
	writemsg(red("*** Please add this user to the portage group if you wish to use portage.\n"))
109
	writemsg(red("*** Please add this user to the portage group if you wish to use portage.\n"))
108
	writemsg("\n")
110
	writemsg("\n")
109
	portage_group_warning()
111
	portage_group_warning()
112
113
userpriv_groups = [portage_gid]
114
if secpass >= 2:
115
	for g in grp.getgrall():
116
		if "portage" in g[3]:
117
			userpriv_groups.append(g[2])
118
	userpriv_groups = list(set(userpriv_groups))
(-)pym/portage.py (-3 / +3 lines)
Lines 73-79 Link Here
73
	  INCREMENTALS, EAPI, MISC_SH_BINARY
73
	  INCREMENTALS, EAPI, MISC_SH_BINARY
74
74
75
	from portage_data import ostype, lchown, userland, secpass, uid, wheelgid, \
75
	from portage_data import ostype, lchown, userland, secpass, uid, wheelgid, \
76
	                         portage_uid, portage_gid
76
	                         portage_uid, portage_gid, userpriv_groups
77
	from portage_manifest import Manifest
77
	from portage_manifest import Manifest
78
78
79
	import portage_util
79
	import portage_util
Lines 1926-1932 Link Here
1926
		 ("userpriv" in string.split(mysettings["RESTRICT"]))))
1926
		 ("userpriv" in string.split(mysettings["RESTRICT"]))))
1927
1927
1928
	if droppriv and not uid and portage_gid and portage_uid:
1928
	if droppriv and not uid and portage_gid and portage_uid:
1929
		keywords.update({"uid":portage_uid,"gid":portage_gid,"groups":[portage_gid],"umask":002})
1929
		keywords.update({"uid":portage_uid,"gid":portage_gid,"groups":userpriv_groups,"umask":002})
1930
1930
1931
	if not free:
1931
	if not free:
1932
		free=((droppriv and "usersandbox" not in features) or \
1932
		free=((droppriv and "usersandbox" not in features) or \
Lines 2257-2263 Link Here
2257
						spawn_keywords.update({
2257
						spawn_keywords.update({
2258
							"uid"    : portage_uid,
2258
							"uid"    : portage_uid,
2259
							"gid"    : portage_gid,
2259
							"gid"    : portage_gid,
2260
							"groups" : [portage_gid],
2260
							"groups" : userpriv_groups,
2261
							"umask"  : 002})
2261
							"umask"  : 002})
2262
2262
2263
					try:
2263
					try:

Return to bug 137610