Eric Andersen | ab050f5 | 2001-01-27 06:01:43 +0000 | [diff] [blame] | 1 | #ifndef __BB_PWD_H |
| 2 | #define __BB_PWD_H |
| 3 | |
| 4 | #if defined USE_SYSTEM_PWD_GRP |
| 5 | #include <pwd.h> |
| 6 | #else |
| 7 | |
Eric Andersen | ab050f5 | 2001-01-27 06:01:43 +0000 | [diff] [blame] | 8 | #include <sys/types.h> |
| 9 | #include <features.h> |
| 10 | #include <stdio.h> |
| 11 | |
| 12 | /* The passwd structure. */ |
| 13 | struct passwd |
| 14 | { |
| 15 | char *pw_name; /* Username. */ |
| 16 | char *pw_passwd; /* Password. */ |
| 17 | uid_t pw_uid; /* User ID. */ |
| 18 | gid_t pw_gid; /* Group ID. */ |
| 19 | char *pw_gecos; /* Real name. */ |
| 20 | char *pw_dir; /* Home directory. */ |
| 21 | char *pw_shell; /* Shell program. */ |
| 22 | }; |
| 23 | |
Eric Andersen | ed3ef50 | 2001-01-27 08:24:39 +0000 | [diff] [blame] | 24 | extern void setpwent __P ((void)); |
| 25 | extern void endpwent __P ((void)); |
| 26 | extern struct passwd * getpwent __P ((void)); |
Eric Andersen | ab050f5 | 2001-01-27 06:01:43 +0000 | [diff] [blame] | 27 | |
Eric Andersen | ed3ef50 | 2001-01-27 08:24:39 +0000 | [diff] [blame] | 28 | extern int putpwent __P ((__const struct passwd * __p, FILE * __f)); |
| 29 | extern int getpw __P ((uid_t uid, char *buf)); |
Eric Andersen | ab050f5 | 2001-01-27 06:01:43 +0000 | [diff] [blame] | 30 | |
Eric Andersen | ed3ef50 | 2001-01-27 08:24:39 +0000 | [diff] [blame] | 31 | extern struct passwd * fgetpwent __P ((FILE * file)); |
Eric Andersen | ab050f5 | 2001-01-27 06:01:43 +0000 | [diff] [blame] | 32 | |
Eric Andersen | ed3ef50 | 2001-01-27 08:24:39 +0000 | [diff] [blame] | 33 | extern struct passwd * getpwuid __P ((__const uid_t)); |
| 34 | extern struct passwd * getpwnam __P ((__const char *)); |
Eric Andersen | ab050f5 | 2001-01-27 06:01:43 +0000 | [diff] [blame] | 35 | |
Eric Andersen | ed3ef50 | 2001-01-27 08:24:39 +0000 | [diff] [blame] | 36 | extern struct passwd * __getpwent __P ((__const int passwd_fd)); |
Eric Andersen | ab050f5 | 2001-01-27 06:01:43 +0000 | [diff] [blame] | 37 | |
| 38 | #endif /* USE_SYSTEM_PWD_GRP */ |
| 39 | #endif /* __BB_PWD_H */ |
| 40 | |