Commit | Line | Data |
---|---|---|
c9017fa0 KB |
1 | /*- |
2 | * Copyright (c) 1989 The Regents of the University of California. | |
cef611b5 KB |
3 | * All rights reserved. |
4 | * | |
c9017fa0 | 5 | * %sccs.include.redist.c% |
cef611b5 | 6 | * |
9895f165 | 7 | * @(#)pwd.h 5.13 (Berkeley) %G% |
cef611b5 | 8 | */ |
8e9730e6 | 9 | |
d2b7358e KB |
10 | #ifndef _PWD_H_ |
11 | #define _PWD_H_ | |
12 | ||
c6bdbb03 KM |
13 | #include <sys/types.h> |
14 | ||
c9017fa0 | 15 | #ifndef _POSIX_SOURCE |
96efcec2 KB |
16 | #define _PATH_PASSWD "/etc/passwd" |
17 | #define _PATH_MASTERPASSWD "/etc/master.passwd" | |
96efcec2 | 18 | |
c9ad648f KB |
19 | #define _PATH_MP_DB "/etc/pwd.db" |
20 | #define _PATH_SMP_DB "/etc/spwd.db" | |
7fb1d480 KB |
21 | |
22 | #define _PATH_PWD_MKDB "/usr/sbin/pwd_mkdb" | |
23 | ||
f79fc1a1 KB |
24 | #define _PW_KEYBYNAME '1' /* stored by name */ |
25 | #define _PW_KEYBYNUM '2' /* stored by entry in the "file" */ | |
26 | #define _PW_KEYBYUID '3' /* stored by uid */ | |
27 | ||
28 | #define _PASSWORD_EFMT1 '_' /* extended encryption format */ | |
96efcec2 | 29 | |
9895f165 | 30 | #define _PASSWORD_LEN 128 /* max length, not counting NULL */ |
c9017fa0 | 31 | #endif |
1c688602 | 32 | |
cef611b5 | 33 | struct passwd { |
c9017fa0 KB |
34 | char *pw_name; /* user name */ |
35 | char *pw_passwd; /* encrypted password */ | |
36 | int pw_uid; /* user uid */ | |
37 | int pw_gid; /* user gid */ | |
38 | time_t pw_change; /* password change time */ | |
39 | char *pw_class; /* user access class */ | |
40 | char *pw_gecos; /* Honeywell login info */ | |
41 | char *pw_dir; /* home directory */ | |
42 | char *pw_shell; /* default shell */ | |
43 | time_t pw_expire; /* account expiration */ | |
8e9730e6 SL |
44 | }; |
45 | ||
91befe9c KB |
46 | #include <sys/cdefs.h> |
47 | ||
48 | __BEGIN_DECLS | |
98c93b63 KB |
49 | struct passwd *getpwuid __P((uid_t)); |
50 | struct passwd *getpwnam __P((const char *)); | |
c9017fa0 | 51 | #ifndef _POSIX_SOURCE |
98c93b63 KB |
52 | struct passwd *getpwent __P((void)); |
53 | int setpassent __P((int)); | |
54 | int setpwent __P((void)); | |
55 | void endpwent __P((void)); | |
c9017fa0 | 56 | #endif |
91befe9c | 57 | __END_DECLS |
d2b7358e KB |
58 | |
59 | #endif /* !_PWD_H_ */ |