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