|
From: Tom T. <Tom...@sa...> - 2005-12-09 21:55:47
|
[Hmm, looks like I didn't include the test pgm the first time]
Consider the test program "fe.c" below. If I do cc -g fe.c and then =
valgrind --trace-children=3Dno a.out
=3D=3D4014=3D=3D Conditional jump or move depends on =
uninitialised value(s)
=3D=3D4014=3D=3D at 0x40063D: main (fe.c:12)
This is inside the child! Is that appropriate?
What I am really trying to do is exec a set-user-id program. Currently =
valgrind fails with EACCES but I prefer that it instead print a warning =
and then just exec the program untraced (which is what "truss"-type =
commands do).
Thanks much for considering this,
Tom Truscott
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
#include <stdio.h>
#include <unistd.h>
int main()
{
int uninit;
switch(fork())
{
case -1: perror("fork"); return 1;
case 0: /* child */
if (uninit) printf("child: bletch\n");
execl("/bin/su", "su", NULL);
perror("execl");
return 1;
}
printf("parent: sleeping\n");
sleep(10);
return 0;
}
|