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 | * |
7fb1d480 | 7 | * @(#)pwd.h 5.7 (Berkeley) %G% |
cef611b5 | 8 | */ |
8e9730e6 | 9 | |
c6bdbb03 KM |
10 | #include <sys/types.h> |
11 | ||
c9017fa0 | 12 | #ifndef _POSIX_SOURCE |
96efcec2 KB |
13 | #define _PATH_PASSWD "/etc/passwd" |
14 | #define _PATH_MASTERPASSWD "/etc/master.passwd" | |
96efcec2 | 15 | |
7fb1d480 KB |
16 | #define _PATH_MP_DB "/var/db/pwd.db" |
17 | #define _PATH_SMP_DB "/var/db/spwd.db" | |
18 | ||
19 | #define _PATH_PWD_MKDB "/usr/sbin/pwd_mkdb" | |
20 | ||
21 | #define _PW_KEYBYNAME '1' | |
22 | #define _PW_KEYBYNUM '2' | |
23 | #define _PW_KEYBYUID '3' | |
96efcec2 | 24 | |
1c688602 | 25 | #define _PASSWORD_LEN 128 |
c9017fa0 | 26 | #endif |
1c688602 | 27 | |
cef611b5 | 28 | struct passwd { |
c9017fa0 KB |
29 | char *pw_name; /* user name */ |
30 | char *pw_passwd; /* encrypted password */ | |
31 | int pw_uid; /* user uid */ | |
32 | int pw_gid; /* user gid */ | |
33 | time_t pw_change; /* password change time */ | |
34 | char *pw_class; /* user access class */ | |
35 | char *pw_gecos; /* Honeywell login info */ | |
36 | char *pw_dir; /* home directory */ | |
37 | char *pw_shell; /* default shell */ | |
38 | time_t pw_expire; /* account expiration */ | |
8e9730e6 SL |
39 | }; |
40 | ||
91befe9c KB |
41 | #include <sys/cdefs.h> |
42 | ||
43 | __BEGIN_DECLS | |
44 | struct passwd *getpwuid __P((uid_t)); | |
45 | struct passwd *getpwnam __P((const char *)); | |
c9017fa0 | 46 | #ifndef _POSIX_SOURCE |
91befe9c KB |
47 | struct passwd *getpwent __P((void)); |
48 | int setpwent __P((void)); | |
49 | void endpwent __P((void)); | |
50 | void setpwfile __P((const char *)); | |
51 | int setpassent __P((int)); | |
c9017fa0 | 52 | #endif |
91befe9c | 53 | __END_DECLS |