Name: Anonymous 2008-01-22 18:24
How would I make my program check if it was root?
#include <stdio.h>
#include <stdlib.h>
int main(void) {
if(strcmp("root", getenv("USER")) == 0)
printf("you are root\n");
else printf("you are not root\n");
return 0;
}