home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2082 / shadow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-28  |  1.2 KB  |  47 lines

  1. /*
  2.  * Copyright 1988, 1989, 1990, John F. Haugh II
  3.  * All rights reserved.
  4.  *
  5.  * Use, duplication, and disclosure prohibited without
  6.  * the express written permission of the author.
  7.  */
  8.  
  9. /*
  10.  * This information is not derived from AT&T licensed sources.  Posted
  11.  * to the USENET 11/88, and updated 11/90 with information from SVR4.
  12.  *
  13.  *    @(#)shadow.h    3.1    10:14:23    11/9/90
  14.  */
  15.  
  16. /*
  17.  * Shadow password security file structure.
  18.  */
  19.  
  20. struct    spwd {
  21.     char    *sp_namp;    /* login name */
  22.     char    *sp_pwdp;    /* encrypted password */
  23.     long    sp_lstchg;    /* date of last change */
  24.     long    sp_min;        /* minimum number of days between changes */
  25.     long    sp_max;        /* maximum number of days between changes */
  26.     long    sp_warn;    /* number of days of warning before password
  27.                    expires */
  28.     long    sp_inact;    /* number of days after password expires
  29.                    until the account becomes unusable. */
  30.     long    sp_expire;    /* days since 1/1/70 until account expires */
  31.     unsigned long    sp_flag; /* reserved for future use */
  32. };
  33.  
  34. /*
  35.  * Shadow password security file functions.
  36.  */
  37.  
  38. struct    spwd    *getspent ();
  39. struct    spwd    *getspnam ();
  40. struct    spwd    *sgetspent ();
  41. void    setspent ();
  42. void    endspent ();
  43. struct    spwd    *fgetspent ();
  44. int    putspent ();
  45.  
  46. #define  SHADOW "/etc/shadow"
  47.