ftp.nice.ch/pub/next/unix/network/news/nn.6.4.16.s.tar.gz#/nn/usercheck.c

This is usercheck.c in view mode; [Download] [Up]

/* check for whether caller is a specific uid (numeric) */

main(argc, argv)
int argc;
char *argv[];
{
    int uid = 0;

    if (argc > 1) uid = atoi(argv[1]);

    exit(getuid() == uid ? 0 : 1);
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.