home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume38 / shadow / part13 / shadow.h < prev    next >
C/C++ Source or Header  |  1993-08-14  |  2KB  |  82 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. #ifndef    _H_SHADOW
  10. #define    _H_SHADOW
  11.  
  12. /*
  13.  * This information is not derived from AT&T licensed sources.  Posted
  14.  * to the USENET 11/88, and updated 11/90 with information from SVR4.
  15.  *
  16.  *    @(#)shadow.h    3.3    09:06:50    07 Dec 1990
  17.  */
  18.  
  19. #ifdef    ITI_AGING
  20. typedef    time_t    sptime;
  21. #else
  22. typedef    long    sptime;
  23. #endif
  24.  
  25. /*
  26.  * Shadow password security file structure.
  27.  */
  28.  
  29. struct    spwd {
  30.     char    *sp_namp;    /* login name */
  31.     char    *sp_pwdp;    /* encrypted password */
  32.     sptime    sp_lstchg;    /* date of last change */
  33.     sptime    sp_min;        /* minimum number of days between changes */
  34.     sptime    sp_max;        /* maximum number of days between changes */
  35.     sptime    sp_warn;    /* number of days of warning before password
  36.                    expires */
  37.     sptime    sp_inact;    /* number of days after password expires
  38.                    until the account becomes unusable. */
  39.     sptime    sp_expire;    /* days since 1/1/70 until account expires */
  40.     unsigned long    sp_flag; /* reserved for future use */
  41. };
  42.  
  43. /*
  44.  * Shadow password security file functions.
  45.  */
  46.  
  47. struct    spwd    *getspent ();
  48. struct    spwd    *getspnam ();
  49. struct    spwd    *sgetspent ();
  50. struct    spwd    *fgetspent ();
  51. void    setspent ();
  52. void    endspent ();
  53. int    putspent ();
  54.  
  55. #define  SHADOW "/etc/shadow"
  56.  
  57. /*
  58.  * Shadow group security file structure
  59.  */
  60.  
  61. struct    sgrp {
  62.     char    *sg_name;    /* group name */
  63.     char    *sg_passwd;    /* group password */
  64.     char    **sg_adm;    /* group administator list */
  65.     char    **sg_mem;    /* group membership list */
  66. };
  67.  
  68. /*
  69.  * Shadow group security file functions.
  70.  */
  71.  
  72. struct    sgrp    *getsgent ();
  73. struct    sgrp    *getsgnam ();
  74. struct    sgrp    *sgetsgent ();
  75. struct    sgrp    *fgetsgent ();
  76. void    setsgent ();
  77. void    endsgent ();
  78. int    putsgent ();
  79.  
  80. #define    GSHADOW    "/etc/gshadow"
  81. #endif
  82.