diff options
author | Michał Górny <mgorny@gentoo.org> | 2015-07-06 20:57:49 +0200 |
---|---|---|
committer | Tim Harder <radhermit@gmail.com> | 2015-07-09 21:30:16 -0400 |
commit | 40943fa6686db81b6805a4b1475a9d3ac2e0c82e (patch) | |
tree | fe4ae7c9c4dc68147957f434495f0cc50679907b | |
parent | bash: move EAPI 0 to EAPI 5 src_test differences into separate libs (diff) | |
download | pkgcore-40943fa6686db81b6805a4b1475a9d3ac2e0c82e.tar.gz pkgcore-40943fa6686db81b6805a4b1475a9d3ac2e0c82e.tar.bz2 pkgcore-40943fa6686db81b6805a4b1475a9d3ac2e0c82e.zip |
Remove unused and unclear concept of secpass
The secpass concept was inherited from Portage but the implementation
disagrees with the current one in Portage. It is unclear and not used
anywhere in pkgcore. Removing it seems the cleanest way forward.
-rw-r--r-- | pkgcore/os_data.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/pkgcore/os_data.py b/pkgcore/os_data.py index eb2e2d5b..aa6c433d 100644 --- a/pkgcore/os_data.py +++ b/pkgcore/os_data.py @@ -11,7 +11,7 @@ This will be killed off and bound into configuration subsystem at some point from __future__ import print_function __all__ = ( - "ostype", "portage_gid", "portage_uid", "root_gid", "root_uid", "secpass", + "ostype", "portage_gid", "portage_uid", "root_gid", "root_uid", "userland", "wheelgid", "xargs", ) @@ -39,20 +39,13 @@ elif ostype in ("FreeBSD", "OpenBSD", "NetBSD", "SunOS"): else: raise Exception("Operating system unsupported, '%s'" % ostype) -# Secpass will be set to 1 if the user is root or in the portage group. -secpass = 0 - uid = os.getuid() # hard coding sucks. root_uid = 0 root_gid = wheelgid = 0 -if uid == 0: - secpass = 2 try: wheelgid = grp.getgrnam("wheel").gr_gid - if (not secpass) and (wheelgid in os.getgroups()): - secpass = 1 except KeyError: pass @@ -62,9 +55,6 @@ try: portage_gid = grp.getgrnam("portage").gr_gid portage_user_groups = tuple(x.gr_name for x in grp.getgrall() if 'portage' in x.gr_mem) - - if secpass == 0: - secpass = 1 except KeyError: portage_uid = 0 portage_gid = wheelgid |