home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / uccs / root.14 / udk / usr / include / shadow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-19  |  1.8 KB  |  60 lines

  1. /*
  2.  * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved. 
  3.  *                                                                         
  4.  *        THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE               
  5.  *                   SANTA CRUZ OPERATION INC.                             
  6.  *                                                                         
  7.  *   The copyright notice above does not evidence any actual or intended   
  8.  *   publication of such source code.                                      
  9.  */
  10.  
  11. #ifndef _SHADOW_H
  12. #define _SHADOW_H
  13. #ident    "@(#)sgs-head:common/head/shadow.h    1.5"
  14.  
  15. #define PASSWD         "/etc/passwd"
  16. #define SHADOW        "/etc/shadow"
  17. #define OPASSWD        "/etc/opasswd"
  18. #define OSHADOW     "/etc/oshadow"
  19. #define PASSTEMP    "/etc/ptmp"
  20. #define SHADTEMP    "/etc/stmp"
  21.  
  22. #define    DAY        (24L * 60 * 60) /* 1 day in seconds */
  23. #define DAY_NOW        (long)time((long *)0) / DAY
  24.  
  25. /* The spwd structure is used in the retreval of information from
  26.    /etc/shadow.  It is used by routines in the libos library */
  27.  
  28. struct spwd {
  29.     char        *sp_namp;    /* user name */
  30.     char        *sp_pwdp;    /* user password */
  31.     long        sp_lstchg;    /* password lastchanged date */
  32.     long        sp_min;        /* min. days between password changes */
  33.     long        sp_max;        /* num. days password is valid */
  34.     long        sp_warn;    /* num. days to warn to change passwd */
  35.     long        sp_inact;    /* num. days the login is inactive */
  36.     long        sp_expire;    /* date when login becomes invalid */
  37.     unsigned long    sp_flag;    /* currently not being used */
  38. };
  39.  
  40. struct _FILE_;
  41.  
  42. #ifdef __cplusplus
  43. extern "C" {
  44. #endif
  45.  
  46. extern void    setspent(void);
  47. extern void    endspent(void);
  48. struct spwd    *getspent(void);
  49. struct spwd    *fgetspent(struct _FILE_ *);
  50. struct spwd    *getspnam(const char *);
  51. extern int    putspent(const struct spwd *, struct _FILE_ *);
  52. extern int    lckpwdf(void);
  53. extern int    ulckpwdf(void);
  54.  
  55. #ifdef __cplusplus
  56. }
  57. #endif
  58.  
  59. #endif /*_SHADOW_H*/
  60.