Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (10 sloc) 261 Bytes
#include <sys/types.h>
#include <unistd.h>
int main(int argc, char * argv[], char * envp[])
{
// please notice, on some OS's id is on /bin/
char * my_args[] = { "/usr/bin/id", NULL };
setuid(0);
setgid(0);
execve(my_args[0], my_args, 0);
}
You can’t perform that action at this time.