home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 38.ddi / root.3 / usr / include / shadow.h / shadow.h
Encoding:
C/C++ Source or Header  |  1990-10-02  |  2.0 KB  |  62 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1988 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ident    "@(#)/usr/include/shadow.h.sl 1.2 5.0 08/27/90 62421 AT&T-USO 1.3"
  11.  
  12. #define PASSWD         "/etc/passwd"
  13. #define SHADOW        "/etc/shadow"
  14. #define OPASSWD        "/etc/opasswd"
  15. #define OSHADOW     "/etc/oshadow"
  16. #define PASSTEMP    "/etc/ptmp"
  17. #define SHADTEMP    "/etc/stmp"
  18.  
  19. #define    DAY        (24L * 60 * 60) /* 1 day in seconds */
  20. #define DAY_NOW        (long)time((long *)0) / DAY
  21.             /* The above timezone variable is set by a call to
  22.                any ctime(3c) routine.  Programs using the DAY_NOW
  23.                macro must call one of the ctime routines, 
  24.                e.g. tzset(), BEFORE referencing DAY_NOW */
  25.  
  26. /* The spwd structure is used in the retreval of information from
  27.    /etc/shadow.  It is used by routines in the libos library */
  28.  
  29. struct spwd {
  30.     char *sp_namp ; /* user name */
  31.     char *sp_pwdp ; /* user password */
  32.     long sp_lstchg ; /* password lastchanged date */
  33.     long sp_min ; /* minimum number of days between password changes */
  34.     long sp_max ; /* number of days password is valid */
  35.     long sp_warn ; /* number of days to warn user to change passwd */
  36.     long sp_inact ; /* number of days the login may be inactive */
  37.     long sp_expire ; /* date when the login is no longer valid */
  38.     unsigned long  sp_flag; /* currently not being used */
  39. } ;
  40.  
  41. #if defined(__STDC__)
  42.  
  43. #ifndef _STDIO_H
  44. #include <stdio.h>
  45. #endif
  46.  
  47. /* Declare all shadow password functions */
  48.  
  49. extern void    setspent(void), endspent(void);
  50. extern    struct    spwd    *getspent(void), *fgetspent(FILE *), *getspnam(const char *);
  51. extern    int    putspent(const struct spwd *, FILE *), lckpwdf(void), ulckpwdf(void);
  52.  
  53. #else
  54.  
  55. /* Declare all shadow password functions */
  56.  
  57. void         setspent(), endspent() ;
  58. struct spwd     *getspent(), *fgetspent(), *getspnam() ;
  59. int         putspent(), lckpwdf(), ulckpwdf() ;
  60.  
  61. #endif
  62.