|
|
1.1 root 1: /*-
2: * Copyright (c) 1989 The Regents of the University of California.
3: * All rights reserved.
4: *
5: * Redistribution and use in source and binary forms are permitted
6: * provided that: (1) source distributions retain this entire copyright
7: * notice and comment, and (2) distributions including binaries display
8: * the following acknowledgement: ``This product includes software
9: * developed by the University of California, Berkeley and its contributors''
10: * in the documentation or other materials provided with the distribution
11: * and in all advertising materials mentioning features or use of this
12: * software. Neither the name of the University nor the names of its
13: * contributors may be used to endorse or promote products derived
14: * from this software without specific prior written permission.
15: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
17: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18: *
19: * @(#)pwd.h 5.5 (Berkeley) 5/29/90
20: */
21:
22: #include <sys/types.h>
23:
24: #ifndef _POSIX_SOURCE
25: #define _PATH_PASSWD "/etc/passwd"
26: #define _PATH_MASTERPASSWD "/etc/master.passwd"
27: #define _PATH_MKPASSWD "/usr/sbin/mkpasswd"
28: #define _PATH_PTMP "/etc/ptmp"
29:
30: #define _PW_KEYBYNAME '0'
31: #define _PW_KEYBYUID '1'
32:
33: #define _PASSWORD_LEN 128
34: #endif
35:
36: struct passwd {
37: char *pw_name; /* user name */
38: char *pw_passwd; /* encrypted password */
39: int pw_uid; /* user uid */
40: int pw_gid; /* user gid */
41: time_t pw_change; /* password change time */
42: char *pw_class; /* user access class */
43: char *pw_gecos; /* Honeywell login info */
44: char *pw_dir; /* home directory */
45: char *pw_shell; /* default shell */
46: time_t pw_expire; /* account expiration */
47: };
48:
49: #if __STDC__ || c_plusplus
50: struct passwd *getpwuid(uid_t);
51: struct passwd *getpwnam(const char *);
52: #ifndef _POSIX_SOURCE
53: struct passwd *getpwent(void);
54: int setpwent(void);
55: void endpwent(void);
56: void setpwfile(const char *);
57: int setpassent(int);
58: #endif
59: #else
60: struct passwd *getpwuid();
61: struct passwd *getpwnam();
62: #ifndef _POSIX_SOURCE
63: struct passwd *getpwent();
64: int setpwent();
65: void endpwent();
66: void setpwfile();
67: int setpassent();
68: #endif
69: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.