|
From: First L. <tra...@ho...> - 2007-08-21 12:31:33
|
Hello I'm using valgrind/callgrind to perform profiling on a binary that calls a = SUIDed binary. But according to what I saw on the forums valgrind doesn't l= ike SUIDed binaries. :s Is there a way to inform valgrind/callgrind not to profile the SUIDed binar= y and just run it ? In my particular case, the SUIDed binary is oracle that must run as oracle:= dba and the main binary must run as an other user Thanks and best regards Patrick _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/= |
|
From: Timothy B. <T.E...@me...> - 2007-08-27 09:40:06
|
In message <BAY...@ph...l>, First Last
<tra...@ho...> wrote:
>
> Hello
>
> I'm using valgrind/callgrind to perform profiling on a binary that calls a
> SUIDed binary. But according to what I saw on the forums valgrind doesn't
> like SUIDed binaries. :s
>
> Is there a way to inform valgrind/callgrind not to profile the SUIDed
> binary and just run it ?
I've just had the same problem, this patch solves it:
diff -ur valgrind-3.2.3/coregrind/m_libcfile.c valgrind-3.2.3-teb1/coregrind/m_libcfile.c
--- valgrind-3.2.3/coregrind/m_libcfile.c 2007-01-08 07:43:15.000000000 +0000
+++ valgrind-3.2.3-teb1/coregrind/m_libcfile.c 2007-08-27 01:00:17.000000000 +0100
@@ -35,6 +35,7 @@
#include "pub_core_libcprint.h" // VG_(sprintf)
#include "pub_core_libcproc.h" // VG_(getpid), VG_(getppid)
#include "pub_core_clientstate.h" // VG_(fd_hard_limit)
+#include "pub_core_options.h" // VG_(clo_trace_children)
#include "pub_core_syscall.h"
#include "vki_unistd.h"
@@ -227,7 +228,7 @@
if group matches, then use the group permissions, else
use other permissions.
- Note that we can't deal with SUID/SGID, so we refuse to run them
+ Note that we can't deal with SUID/SGID, so we refuse to trace them
(otherwise the executable may misbehave if it doesn't have the
permissions it thinks it does).
*/
@@ -247,8 +248,7 @@
}
if (st.st_mode & (VKI_S_ISUID | VKI_S_ISGID)) {
- //VG_(printf)("Can't execute suid/sgid executable %s\n", exe);
- return VKI_EACCES;
+ VG_(clo_trace_children) = False;
}
if (VG_(geteuid)() == st.st_uid) {
--
OpenPGP key fingerprint: D0A6 F403 9745 CED4 6B3B 94CC 8D74 8FC9 9F7F CFE4
|