Commit | Line | Data |
---|---|---|
01995545 BJ |
1 | /* Copyright (c) 1979 Regents of the University of California */ |
2 | #include <retrofit.h> | |
3 | #include <pwd.h> | |
4 | /* | |
5 | * whoami | |
6 | */ | |
7 | struct passwd *getpwuid(); | |
8 | ||
9 | main() | |
10 | { | |
11 | register struct passwd *pp; | |
12 | ||
13 | pp = getpwuid(getuid()); | |
14 | if (pp == 0) { | |
15 | printf("Intruder alert.\n"); | |
16 | exit(1); | |
17 | } | |
18 | printf("%s\n", pp->pw_name); | |
19 | exit(0); | |
20 | } |