Archive for March, 2011
Because my program is multithreaded, I cannot omit the “
-f” flag (also trace child threads and processes) when using strace. And because all children, including the setuid program, are traced, setuid fails. (Yes, I am aware that strace claims it is possible to trace setuid programs, but the trick does not work for me, probably because the setuid program is not directly executed by strace.)
(pid_t) syscall (__NR_clone, CLONE_UNTRACED|SIGCHLD, NULL);
CLONE_SIGCHLD. It’s not a typo.)
I guess there may be better solutions, without modifying the program being traced?