add EGP
[unix-history] / usr / src / old / whoami / whoami.c
CommitLineData
a309c47b
BJ
1static char *sccsid = "@(#)whoami.c 4.1 (Berkeley) %G%";
2#include <pwd.h>
3/*
4 * whoami
5 */
6struct passwd *getpwuid();
7
8main()
9{
10 register struct passwd *pp;
11
12 pp = getpwuid(getuid());
13 if (pp == 0) {
14 printf("Intruder alert.\n");
15 exit(1);
16 }
17 printf("%s\n", pp->pw_name);
18 exit(0);
19}