From: Dirk Mueller Date: Fri, 17 Oct 2003 00:25:07 +0000 (+0000) Subject: whoops. unbreak stat'ing of executables in path X-Git-Tag: svn/VALGRIND_2_1_0~119 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f609e9bfb04504c2ea66f06520254337305826b;p=thirdparty%2Fvalgrind.git whoops. unbreak stat'ing of executables in path git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1943 --- diff --git a/coregrind/valgrind.in b/coregrind/valgrind.in index 3325f096bc..a2fcd58935 100755 --- a/coregrind/valgrind.in +++ b/coregrind/valgrind.in @@ -110,9 +110,10 @@ if [ z"$nptl_threading" = zyes ]; then export LD_ASSUME_KERNEL fi +which_prog="`which $1`" + # Ensure the program isn't statically linked. if [ $# != 0 ] ; then - which_prog="`which $1`" case `file "$which_prog"` in *"statically linked"*) echo "\`$which_prog' is statically linked" @@ -124,8 +125,8 @@ if [ $# != 0 ] ; then fi # Ensure that there is no suid or sgid flag -if [ `stat -c %a "$1"` -gt 2000 ] ; then - echo "\`$1' is suid/sgid." +if [ `stat -c %a "$which_prog"` -gt 2000 ] ; then + echo "\`$which_prog' is suid/sgid." echo "Valgrind can't handle these executables, as it" echo "requires the LD_PRELOAD feature in order to work." echo ""