home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / unix / armlinux / alpha / PARTITIONS / USR_GZ / usr / include / shadow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-14  |  2.3 KB  |  92 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 _SHADOW_H
  10.  
  11. #define _SHADOW_H    1
  12. #include <features.h>
  13.  
  14. __BEGIN_DECLS
  15.  
  16. #include <gnu/types.h>
  17. #include <stdio.h>
  18. #include <pwd.h>
  19. #include <grp.h>
  20.  
  21. /*
  22.  * This information is not derived from AT&T licensed sources.  Posted
  23.  * to the USENET 11/88, and updated 11/90 with information from SVR4.
  24.  *
  25.  *    @(#)shadow.h    3.3    09:06:50    12/7/90
  26.  */
  27.  
  28. typedef __time_t sptime;
  29.  
  30. /*
  31.  * Shadow password security file structure.
  32.  */
  33.  
  34. struct spwd
  35. {
  36.   char *sp_namp;        /* login name */
  37.   char *sp_pwdp;        /* encrypted password */
  38.   sptime sp_lstchg;        /* date of last change */
  39.   sptime sp_min;        /* minimum number of days between changes */
  40.   sptime sp_max;        /* maximum number of days between changes */
  41.   sptime sp_warn;        /* number of days of warning before password
  42.                    expires */
  43.   sptime sp_inact;        /* number of days after password expires
  44.                    until the account becomes unusable. */
  45.   sptime sp_expire;        /* days since 1/1/70 until account expires */
  46.   unsigned long sp_flag;    /* reserved for future use */
  47. };
  48.  
  49. /*
  50.  * Shadow password security file functions.
  51.  */
  52.  
  53. extern void setspent __P ((void));
  54. extern void endspent __P ((void));
  55. extern struct spwd *sgetspent __P ((__const char *__string));
  56. extern struct spwd *fgetspent __P ((FILE *__fp));
  57. extern struct spwd *getspent __P ((void));
  58. extern struct spwd *getspnam __P ((__const char *__name));
  59. extern int putspent __P ((__const struct spwd *__sp, FILE *__fp));
  60.  
  61. #define SHADOW "/etc/shadow"
  62.  
  63. /*
  64.  * Shadow group security file structure
  65.  */
  66.  
  67. struct    sgrp
  68. {
  69.   char *sg_name;        /* group name */
  70.   char *sg_passwd;        /* group password */
  71.   char **sg_adm;        /* group administator list */
  72.   char **sg_mem;        /* group membership list */
  73. };
  74.  
  75. /*
  76.  * Shadow group security file functions.
  77.  */
  78.  
  79. extern void setsgent __P ((void));
  80. extern void endsgent __P ((void));
  81. extern struct sgrp *sgetsgent __P ((__const char *__string));
  82. extern struct sgrp *fgetsgent __P ((FILE *__fp));
  83. extern struct sgrp *getsgent __P ((void));
  84. extern struct sgrp *getsgnam __P ((__const char *__str));
  85. extern int putsgent __P ((__const struct sgrp *_grp, FILE *__fp));
  86.  
  87. #define GSHADOW "/etc/gshadow"
  88.  
  89. __END_DECLS
  90.  
  91. #endif /* shadow.h */
  92.