home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / duucp-1.17 / AU-117b4-src.lha / src / sendmail / CheckUser.c next >
Encoding:
C/C++ Source or Header  |  1994-04-27  |  423 b   |  32 lines

  1. /*
  2. **  CheckUser.c
  3. **
  4. **  Written by Ty Sarna
  5. **  January, 1994
  6. */
  7.  
  8. #include <fcntl.h>
  9. #include <stdio.h>
  10. #include <pwd.h>
  11.  
  12. #include "defs.h"
  13.  
  14. void
  15. main (int argc, char *argv[])
  16. {
  17.     if (argc != 2) {
  18.         printf ("usage: CheckUser username\n");
  19.         exit (20);
  20.     }
  21.  
  22.     /* check UULib:passwd */
  23.     if (getpwnam (argv [1])) {
  24.         printf ("%s%s\n", GetConfigDir (UUMAIL), argv [1]);
  25.     }
  26.     else {
  27.         printf ("*%s\n", argv [1]);
  28.     }
  29.  
  30.     exit (0);
  31. }
  32.