Eric Andersen | bdfd0d7 | 2001-10-24 05:00:29 +0000 | [diff] [blame] | 1 | #ifndef __CONFIG_GRP_H |
| 2 | #define __CONFIG_GRP_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 <grp.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 | |
Robert Griebl | ea1a63a | 2002-06-04 20:10:23 +0000 | [diff] [blame] | 13 | |
Eric Andersen | ab050f5 | 2001-01-27 06:01:43 +0000 | [diff] [blame] | 14 | /* The group structure */ |
| 15 | struct group |
| 16 | { |
| 17 | char *gr_name; /* Group name. */ |
| 18 | char *gr_passwd; /* Password. */ |
| 19 | gid_t gr_gid; /* Group ID. */ |
| 20 | char **gr_mem; /* Member list. */ |
| 21 | }; |
| 22 | |
Eric Andersen | ed3ef50 | 2001-01-27 08:24:39 +0000 | [diff] [blame] | 23 | extern void setgrent __P ((void)); |
| 24 | extern void endgrent __P ((void)); |
| 25 | extern struct group * getgrent __P ((void)); |
Eric Andersen | ab050f5 | 2001-01-27 06:01:43 +0000 | [diff] [blame] | 26 | |
Eric Andersen | ed3ef50 | 2001-01-27 08:24:39 +0000 | [diff] [blame] | 27 | extern struct group * getgrgid __P ((__const gid_t gid)); |
| 28 | extern struct group * getgrnam __P ((__const char * name)); |
Eric Andersen | ab050f5 | 2001-01-27 06:01:43 +0000 | [diff] [blame] | 29 | |
Eric Andersen | ed3ef50 | 2001-01-27 08:24:39 +0000 | [diff] [blame] | 30 | extern struct group * fgetgrent __P ((FILE * file)); |
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 int setgroups __P ((size_t n, __const gid_t * groups)); |
| 33 | extern int initgroups __P ((__const char * user, gid_t gid)); |
Eric Andersen | ab050f5 | 2001-01-27 06:01:43 +0000 | [diff] [blame] | 34 | |
Russ Dill | f796700 | 2003-12-18 22:40:58 +0000 | [diff] [blame^] | 35 | extern struct group * bb_getgrent __P ((int grp_fd)); |
Eric Andersen | ab050f5 | 2001-01-27 06:01:43 +0000 | [diff] [blame] | 36 | |
| 37 | #endif /* USE_SYSTEM_PWD_GRP */ |
Eric Andersen | bdfd0d7 | 2001-10-24 05:00:29 +0000 | [diff] [blame] | 38 | #endif /* __CONFIG_GRP_H */ |
Eric Andersen | ab050f5 | 2001-01-27 06:01:43 +0000 | [diff] [blame] | 39 | |