aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2020-02-15 12:37:39 -0800
committerZac Medico <zmedico@gentoo.org>2020-02-15 12:42:24 -0800
commitd8d02bd82f11921db5140941cef4077359b0211d (patch)
tree6b618f4fe3d73fe34bbc61156d73274849952578 /lib
parentfetch: split out _ensure_distdir function (bug 601252) (diff)
downloadportage-d8d02bd82f11921db5140941cef4077359b0211d.tar.gz
portage-d8d02bd82f11921db5140941cef4077359b0211d.tar.bz2
portage-d8d02bd82f11921db5140941cef4077359b0211d.zip
fetch: remove secpass import (bug 601252)
Refer to the portage.secpass.data attribute directly rather than via import value, since the value will change after fork and os.setuid calls when the fetch function is called with dropped privileges as discussed in bug 601252. Bug: https://bugs.gentoo.org/601252 Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/portage/package/ebuild/fetch.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/portage/package/ebuild/fetch.py b/lib/portage/package/ebuild/fetch.py
index e0260829b..06118b1a6 100644
--- a/lib/portage/package/ebuild/fetch.py
+++ b/lib/portage/package/ebuild/fetch.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2019 Gentoo Authors
+# Copyright 2010-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
@@ -46,7 +46,7 @@ from portage.checksum import (get_valid_checksum_keys, perform_md5, verify_all,
checksum_str)
from portage.const import BASH_BINARY, CUSTOM_MIRRORS_FILE, \
GLOBAL_CONFIG_PATH
-from portage.data import portage_gid, portage_uid, secpass, userpriv_groups
+from portage.data import portage_gid, portage_uid, userpriv_groups
from portage.exception import FileNotFound, OperationNotPermitted, \
PortageException, TryAgain
from portage.localization import _
@@ -882,7 +882,7 @@ def fetch(myuris, mysettings, listonly=0, fetchonly=0,
if not has_space_superuser:
has_space = False
- elif secpass < 2:
+ elif portage.data.secpass < 2:
has_space = False
elif userfetch:
has_space = False