Store the original suid bits when suidctl is enabled for bug #135639. Thanks to...
authorZac Medico <zmedico@gentoo.org>
Mon, 5 Jun 2006 17:16:29 +0000 (17:16 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 5 Jun 2006 17:16:29 +0000 (17:16 -0000)
svn path=/main/trunk/; revision=3462

bin/misc-functions.sh

index 1a2f1b3f2d7b2f101c6de4f2b5eafcae3669ce62..6bdd6d6382773da672d639e33c5d5984af89033e 100755 (executable)
@@ -295,6 +295,7 @@ preinst_suid_scan() {
                                        vecho ">>> Removing sbit on non registered ${i/${IMAGE}/}"
                                        for x in 5 4 3 2 1 0; do echo -ne "\a"; sleep 0.25 ; done
                                        vecho -ne "\a"
+                                       ls_ret=$(ls -ldh "${i}")
                                        chmod ugo-s "${i}"
                                        grep ^#${i/${IMAGE}/}$ ${sfconf} > /dev/null || {
                                                # sandbox prevents us from writing directly
@@ -302,7 +303,6 @@ preinst_suid_scan() {
                                                # can easly be bypassed using the addwrite() function
                                                addwrite "${sfconf}"
                                                vecho ">>> Appending commented out entry to ${sfconf} for ${PF}"
-                                               ls_ret=$(ls -ldh "${i}")
                                                echo "## ${ls_ret%${IMAGE}*}${ls_ret#*${IMAGE}}" >> ${sfconf}
                                                echo "#${i/${IMAGE}/}" >> ${sfconf}
                                                # no delwrite() eh?