Discussion:
[Valgrind-developers] Valgrind: r16455 - /trunk/coregrind/m_ume/main.c
s***@valgrind.org
2017-06-26 12:10:44 UTC
Permalink
Author: tom
Date: Mon Jun 26 13:10:42 2017
New Revision: 16455

Log:
Allow setuid/setgid/setcap binaries to be run if
valgrind is running as root.

Modified:
trunk/coregrind/m_ume/main.c

Modified: trunk/coregrind/m_ume/main.c
==============================================================================
--- trunk/coregrind/m_ume/main.c (original)
+++ trunk/coregrind/m_ume/main.c Mon Jun 26 13:10:42 2017
@@ -140,7 +140,7 @@
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);

Loading...