Eric Andersen | ab050f5 | 2001-01-27 06:01:43 +0000 | [diff] [blame] | 1 | #ifndef __BB_GRP_H |
| 2 | #define __BB_GRP_H |
| 3 | |
| 4 | #if defined USE_SYSTEM_PWD_GRP |
| 5 | #include <grp.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 group structure */ |
| 13 | struct group |
| 14 | { |
| 15 | char *gr_name; /* Group name. */ |
| 16 | char *gr_passwd; /* Password. */ |
| 17 | gid_t gr_gid; /* Group ID. */ |
| 18 | char **gr_mem; /* Member list. */ |
| 19 | }; |
| 20 | |
Eric Andersen | ed3ef50 | 2001-01-27 08:24:39 +0000 | [diff] [blame] | 21 | extern void setgrent __P ((void)); |
| 22 | extern void endgrent __P ((void)); |
| 23 | extern struct group * getgrent __P ((void)); |
Eric Andersen | ab050f5 | 2001-01-27 06:01:43 +0000 | [diff] [blame] | 24 | |
Eric Andersen | ed3ef50 | 2001-01-27 08:24:39 +0000 | [diff] [blame] | 25 | extern struct group * getgrgid __P ((__const gid_t gid)); |
| 26 | extern struct group * getgrnam __P ((__const char * name)); |
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 struct group * fgetgrent __P ((FILE * file)); |
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 int setgroups __P ((size_t n, __const gid_t * groups)); |
| 31 | extern int initgroups __P ((__const char * user, gid_t gid)); |
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 group * __getgrent __P ((int grp_fd)); |
Eric Andersen | ab050f5 | 2001-01-27 06:01:43 +0000 | [diff] [blame] | 34 | |
| 35 | #endif /* USE_SYSTEM_PWD_GRP */ |
| 36 | #endif /* __BB_GRP_H */ |
| 37 | |