]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Allow setuid/setgid/setcap binaries to be run if
authorTom Hughes <tom@compton.nu>
Mon, 26 Jun 2017 12:10:42 +0000 (12:10 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 26 Jun 2017 12:10:42 +0000 (12:10 +0000)
valgrind is running as root.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16455

coregrind/m_ume/main.c

index 9990b4df9c51712fe2574556e33037ad105faf1f..aa8db55ccd6db2887e3ffe8f840f2cf58c91515a 100644 (file)
@@ -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);