]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Bug #343967 Don't warn about setuid/setgid/setcap exec for dirs.
authorMark Wielaard <mark@klomp.org>
Mon, 9 Feb 2015 13:27:07 +0000 (13:27 +0000)
committerMark Wielaard <mark@klomp.org>
Mon, 9 Feb 2015 13:27:07 +0000 (13:27 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14922

NEWS
coregrind/m_libcfile.c

diff --git a/NEWS b/NEWS
index 23f3140017941f8331fc58f272a385a1325350f2..8fd2660cca7947abb8369f00c7da0db27dcc3378 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -91,6 +91,7 @@ where XXXXXX is the bug number as listed below.
 343733  Unhandled syscall 187 (msgctl and related) on aarch64
 343802  s390x: Fix false positives "conditional jump or move depends on
         unitialised value(s)"
+343967  Don't warn about setuid/setgid/setcap executable for directories
 n-i-bz  Provide implementations of certain compiler builtins to support
         compilers who may not provide those
 n-i-bz  Old STABS code is still being compiled, but never used. Remove it.
index 210d49b00d14a2510791f38dbc0aa28504012f1f..55d33f7729a4cc8253b003b4b3d36989436b90f5 100644 (file)
@@ -628,6 +628,10 @@ Int VG_(check_executable)(/*OUT*/Bool* is_setuid,
       return sr_Err(res);
    }
 
+   if ( VKI_S_ISDIR (st.mode) ) {
+      return VKI_EACCES;
+   }
+
    if ( (st.mode & (VKI_S_ISUID | VKI_S_ISGID)) && !allow_setuid ) {
       if (is_setuid)
          *is_setuid = True;