|
|
1.1 ! root 1: #include <pwd.h> ! 2: /* ! 3: * whoami ! 4: */ ! 5: struct passwd *getpwuid(); ! 6: ! 7: main() ! 8: { ! 9: register struct passwd *pp; ! 10: ! 11: pp = getpwuid(getuid()); ! 12: if (pp == 0) { ! 13: printf("Intruder alert.\n"); ! 14: exit(1); ! 15: } ! 16: printf("%s\n", pp->pw_name); ! 17: exit(0); ! 18: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.