433d6423c3
Change-Id: Ic716f336b7071063997cf5b4dae6d50e0b4631e9
23 lines
405 B
C
23 lines
405 B
C
#include <sys/types.h>
|
|
#include <sys/wait.h>
|
|
#include <unistd.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
/* Return the tainted state of our child to our parent */
|
|
pid_t childpid;
|
|
int status;
|
|
|
|
childpid = fork();
|
|
if (childpid == (pid_t) -1) exit(-2);
|
|
else if (childpid == 0) {
|
|
exit(issetugid());
|
|
} else {
|
|
wait(&status);
|
|
}
|
|
|
|
return(WEXITSTATUS(status));
|
|
}
|
|
|