From: Tom Hughes Date: Mon, 26 Jun 2017 12:10:42 +0000 (+0000) Subject: Allow setuid/setgid/setcap binaries to be run if X-Git-Tag: VALGRIND_3_14_0~316 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1038ee89e593ad4b5a53cf86cbfeb61420ed0a6e;p=thirdparty%2Fvalgrind.git Allow setuid/setgid/setcap binaries to be run if valgrind is running as root. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16455 --- diff --git a/coregrind/m_ume/main.c b/coregrind/m_ume/main.c index 9990b4df9c..aa8db55ccd 100644 --- a/coregrind/m_ume/main.c +++ b/coregrind/m_ume/main.c @@ -140,7 +140,7 @@ Int VG_(do_exec_inner)(const HChar* exe, ExeInfo* info) Int fd; Int ret; - res = VG_(pre_exec_check)(exe, &fd, False/*allow_setuid*/); + res = VG_(pre_exec_check)(exe, &fd, VG_(geteuid)() == 0/*allow_setuid*/); if (sr_isError(res)) return sr_Err(res);