Annotation of 41BSD/cmd/whoami.c, revision 1.1

1.1     ! root        1: static char *sccsid = "@(#)whoami.c    4.1 (Berkeley) 10/1/80";
        !             2: #include <pwd.h>
        !             3: /*
        !             4:  * whoami
        !             5:  */
        !             6: struct passwd *getpwuid();
        !             7: 
        !             8: main()
        !             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: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.