Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r9399 - main/trunk/bin
Date: Fri, 29 Feb 2008 22:58:19
Message-Id: E1JVEBE-0003OE-5S@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-02-29 22:58:15 +0000 (Fri, 29 Feb 2008)
3 New Revision: 9399
4
5 Modified:
6 main/trunk/bin/misc-functions.sh
7 Log:
8 In the suidctl code, move the addwrite call out of the loop. Thanks to ferringb.
9
10
11 Modified: main/trunk/bin/misc-functions.sh
12 ===================================================================
13 --- main/trunk/bin/misc-functions.sh 2008-02-28 15:08:40 UTC (rev 9398)
14 +++ main/trunk/bin/misc-functions.sh 2008-02-29 22:58:15 UTC (rev 9399)
15 @@ -491,6 +491,10 @@
16 # total suid control.
17 if hasq suidctl $FEATURES; then
18 sfconf=${PORTAGE_CONFIGROOT}etc/portage/suidctl.conf
19 + # sandbox prevents us from writing directly
20 + # to files outside of the sandbox, but this
21 + # can easly be bypassed using the addwrite() function
22 + addwrite "${sfconf}"
23 vecho ">>> Performing suid scan in ${D}"
24 for i in $(find "${D}" -type f \( -perm -4000 -o -perm -2000 \) ); do
25 if [ -s "${sfconf}" ]; then
26 @@ -504,10 +508,6 @@
27 ls_ret=$(ls -ldh "${i}")
28 chmod ugo-s "${i}"
29 grep "^#${i/${D}}$" "${sfconf}" > /dev/null || {
30 - # sandbox prevents us from writing directly
31 - # to files outside of the sandbox, but this
32 - # can easly be bypassed using the addwrite() function
33 - addwrite "${sfconf}"
34 vecho ">>> Appending commented out entry to ${sfconf} for ${PF}"
35 echo "## ${ls_ret%${D}*}${ls_ret#*${D}}" >> "${sfconf}"
36 echo "#${i/${D}}" >> "${sfconf}"
37
38 --
39 gentoo-commits@l.g.o mailing list