Name: Anonymous 2008-01-22 18:24
How would I make my program check if it was root?
#include <unistd.h>
#include <sys/types.h>
#include <stdio.h>
int main () {
if ( geteuid() == 0 )
printf("You're root!\n");
else
printf("You're lower than a maggot!\n");
return 0;
}man 2 geteuid'.