home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / TELECOM / UUCPbb_2_1_src.lzh / UUCPBB21 / password.h < prev    next >
Text File  |  1994-04-05  |  2KB  |  61 lines

  1. /*
  2. ** Definitions for accessing the OS9 password file.
  3. **  Two different delimiters are accepted, ',' and ':'.
  4. **  In the second (Unix like) case, an extra field is
  5. **   defined for comments (ugcos).
  6. */
  7.  
  8. #ifdef TEST
  9. #define  PASSWORD "/DD/SYS/massword"
  10. #else
  11. #define  PASSWORD "/DD/SYS/password"
  12. #endif
  13.  
  14. #ifndef _OSK                    /* OS-9/6809 doesn't know about voids */
  15. # ifndef _VOID_
  16. #  define _VOID_
  17. typedef int void
  18. # endif
  19. #endif
  20.  
  21.  
  22.  
  23. #define  PWEMAX   64             /* mamimum lines in password file */
  24. #define  PWSIZ    132        /* maximim size of password file line */
  25. #define  PWNSIZ   32                /* maximum size of user's name */
  26. #define  PWPSIZ   32            /* maximum size of user's password */
  27. #define  UNXDLM   ':'            /* Unix style password file delim */
  28. #define  OS9DLM   ','             /* OS9 style password file delim */
  29.  
  30.  
  31.  
  32. typedef struct {
  33.       char      *unam,
  34.                 *upw,
  35.                 *uid,
  36.                 *upri,
  37.                 *ugcos,
  38.                 *ucmd,
  39.                 *udat,
  40.                 *ujob;                      /* field pointers */
  41.       } PWENT;
  42.  
  43.  
  44. /* returns a pointer to broken down password entry */
  45. PWENT    *getpwent();
  46.  
  47. /* same, but for the given int uid */
  48. PWENT    *getpwuid();
  49.  
  50. /* same, but for the given char *name */
  51. PWENT    *getpwnam();
  52.  
  53. /* rewinds the password file for another scan */
  54. void setpwent();
  55.  
  56. /* terminates password file access (closes) file */
  57. void endpwent();
  58.  
  59. /* returns the current password entry delimiter */
  60. int getpwdlm();
  61.