From f5d2ce68f39d152c324867198009106968473c93 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Mon, 9 Feb 2015 13:27:07 +0000 Subject: [PATCH] Bug #343967 Don't warn about setuid/setgid/setcap exec for dirs. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14922 --- NEWS | 1 + coregrind/m_libcfile.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/NEWS b/NEWS index 23f3140017..8fd2660cca 100644 --- 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. diff --git a/coregrind/m_libcfile.c b/coregrind/m_libcfile.c index 210d49b00d..55d33f7729 100644 --- a/coregrind/m_libcfile.c +++ b/coregrind/m_libcfile.c @@ -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; -- 2.47.3