From: Zac Medico Date: Fri, 29 Feb 2008 22:58:15 +0000 (-0000) Subject: In the suidctl code, move the addwrite call out of the loop. Thanks to ferringb. X-Git-Tag: v2.2_pre4~43 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=194a6d0d3d48fe899a992daffeb8b36ff75b120b;p=portage.git In the suidctl code, move the addwrite call out of the loop. Thanks to ferringb. svn path=/main/trunk/; revision=9399 --- diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index c9a1383cf..67eaa292e 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -491,6 +491,10 @@ preinst_suid_scan() { # total suid control. if hasq suidctl $FEATURES; then sfconf=${PORTAGE_CONFIGROOT}etc/portage/suidctl.conf + # sandbox prevents us from writing directly + # to files outside of the sandbox, but this + # can easly be bypassed using the addwrite() function + addwrite "${sfconf}" vecho ">>> Performing suid scan in ${D}" for i in $(find "${D}" -type f \( -perm -4000 -o -perm -2000 \) ); do if [ -s "${sfconf}" ]; then @@ -504,10 +508,6 @@ preinst_suid_scan() { ls_ret=$(ls -ldh "${i}") chmod ugo-s "${i}" grep "^#${i/${D}}$" "${sfconf}" > /dev/null || { - # sandbox prevents us from writing directly - # to files outside of the sandbox, but this - # can easly be bypassed using the addwrite() function - addwrite "${sfconf}" vecho ">>> Appending commented out entry to ${sfconf} for ${PF}" echo "## ${ls_ret%${D}*}${ls_ret#*${D}}" >> "${sfconf}" echo "#${i/${D}}" >> "${sfconf}"