From 194a6d0d3d48fe899a992daffeb8b36ff75b120b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 29 Feb 2008 22:58:15 +0000 Subject: In the suidctl code, move the addwrite call out of the loop. Thanks to ferringb. svn path=/main/trunk/; revision=9399 --- bin/misc-functions.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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}" -- cgit v1.2.3-1-g7c22