blob: 637517f3184f65b707f6e56880b9ee63c1ce1b91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#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));
}
|