From: Zac Medico Date: Sun, 12 May 2013 20:21:38 +0000 (-0700) Subject: check-implicit-pointer-usage: safe cwd bug 469338 X-Git-Tag: v2.2.0_alpha175~11 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5448570c89693c89356e1e3d7ad4190c47281eb0;p=portage.git check-implicit-pointer-usage: safe cwd bug 469338 --- diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 725ba55dc..cebc67f75 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # # Miscellaneous shell functions that make use of the ebuild env but don't need @@ -747,7 +747,8 @@ install_qa_check() { local cat_cmd=cat [[ $PORTAGE_LOG_FILE = *.gz ]] && cat_cmd=zcat [[ $reset_debug = 1 ]] && set -x - f=$($cat_cmd "${PORTAGE_LOG_FILE}" | \ + # Use safe cwd, avoiding unsafe import for bug #469338. + f=$(cd "${PORTAGE_PYM_PATH}" ; $cat_cmd "${PORTAGE_LOG_FILE}" | \ "${PORTAGE_PYTHON:-/usr/bin/python}" "$PORTAGE_BIN_PATH"/check-implicit-pointer-usage.py || die "check-implicit-pointer-usage.py failed") if [[ -n ${f} ]] ; then