]>
sourceware.org Git - glibc.git/blob - shadow/shadow.h
1 /* Copyright (C) 1996 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If
16 not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
19 /* Declaration of types and functions for shadow password suite. */
31 /* Paths to the userd files. */
32 #define SHADOW "/etc/shadow"
37 /* Structure of the password file. */
40 char *sp_namp
; /* Login name. */
41 char *sp_pwdp
; /* Encrypted password. */
42 __time_t sp_lstchg
; /* Date of last change. */
43 __time_t sp_min
; /* Minimum number of days between changes. */
44 __time_t sp_max
; /* Maximum number of days between changes. */
45 __time_t sp_warn
; /* Number of days to warn user to change
47 __time_t sp_inact
; /* Number of days the account may be
49 __time_t sp_expire
; /* Number of days since 1970-01-01 until
51 unsigned long int sp_flag
; /* Reserved. */
55 /* Open database for reading. */
56 extern void setspent
__P ((void));
59 extern void endspent
__P ((void));
61 /* Get next entry from database, perhaps after opening the file. */
62 extern struct spwd
*getspent
__P ((void));
64 /* Get shadow entry matching NAME. */
65 extern struct spwd
*getspnam
__P ((__const
char *__name
));
67 /* Read shadow entry from STRING. */
68 extern struct spwd
*sgetspent
__P ((__const
char *__string
));
70 /* Read next shadow entry from STREAM. */
71 extern struct spwd
*fgetspent
__P ((FILE *__stream
));
73 /* Write line containing shadow password entry to stream. */
74 extern int putspent
__P ((__const
struct spwd
*__p
, FILE *__stream
));
77 #ifdef __USE_REENTRANT
78 /* Reentrant versions of some of the functions above. */
79 extern struct spwd
*__getspent_r
__P ((struct spwd
*__result_buf
,
80 char *__buffer
, int __buflen
));
81 extern struct spwd
*getspent_r
__P ((struct spwd
*__result_buf
,
82 char *__buffer
, int __buflen
));
84 extern struct spwd
*__getspnam_r
__P ((__const
char *__name
,
85 struct spwd
*__result_buf
,
86 char *__buffer
, int __buflen
));
87 extern struct spwd
*getspnam_r
__P ((__const
char *__name
,
88 struct spwd
*__result_buf
,
89 char *__buffer
, int __buflen
));
91 extern struct spwd
*__sgetspent_r
__P ((__const
char *__string
,
92 struct spwd
*__result_buf
,
93 char *__buffer
, int __buflen
));
94 extern struct spwd
*sgetspent_r
__P ((__const
char *__string
,
95 struct spwd
*__result_buf
,
96 char *__buffer
, int __buflen
));
98 extern struct spwd
*__fgetspent_r
__P ((FILE *__stream
,
99 struct spwd
*__result_buf
,
100 char *__buffer
, int __buflen
));
101 extern struct spwd
*fgetspent_r
__P ((FILE *__stream
,
102 struct spwd
*__result_buf
,
103 char *__buffer
, int __buflen
));
104 #endif /* reentrant */
107 /* Protect password file against multi writers. */
108 extern int __lckpwdf
__P ((void));
109 extern int lckpwdf
__P ((void));
111 /* Unlock password file. */
112 extern int __ulckpwdf
__P ((void));
113 extern int ulckpwdf
__P ((void));
117 #endif /* shadow.h */
This page took 0.04893 seconds and 6 git commands to generate.