blob: 7cb0d4af6f676d9617009acbda43196c8520f94b [file] [log] [blame]
Eric Andersenbdfd0d72001-10-24 05:00:29 +00001#ifndef __CONFIG_GRP_H
2#define __CONFIG_GRP_H
Eric Andersenab050f52001-01-27 06:01:43 +00003
Robert Grieblea1a63a2002-06-04 20:10:23 +00004#if !defined CONFIG_USE_BB_PWD_GRP
Eric Andersen887ca792002-07-03 23:19:26 +00005#include <grp.h>
Robert Grieblea1a63a2002-06-04 20:10:23 +00006
Eric Andersenab050f52001-01-27 06:01:43 +00007#else
8
Eric Andersenab050f52001-01-27 06:01:43 +00009#include <sys/types.h>
10#include <features.h>
11#include <stdio.h>
12
Robert Grieblea1a63a2002-06-04 20:10:23 +000013
Eric Andersenab050f52001-01-27 06:01:43 +000014/* The group structure */
15struct 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 Andersened3ef502001-01-27 08:24:39 +000023extern void setgrent __P ((void));
24extern void endgrent __P ((void));
25extern struct group * getgrent __P ((void));
Eric Andersenab050f52001-01-27 06:01:43 +000026
Eric Andersened3ef502001-01-27 08:24:39 +000027extern struct group * getgrgid __P ((__const gid_t gid));
28extern struct group * getgrnam __P ((__const char * name));
Eric Andersenab050f52001-01-27 06:01:43 +000029
Eric Andersened3ef502001-01-27 08:24:39 +000030extern struct group * fgetgrent __P ((FILE * file));
Eric Andersenab050f52001-01-27 06:01:43 +000031
Eric Andersened3ef502001-01-27 08:24:39 +000032extern int setgroups __P ((size_t n, __const gid_t * groups));
33extern int initgroups __P ((__const char * user, gid_t gid));
Eric Andersenab050f52001-01-27 06:01:43 +000034
Russ Dillf7967002003-12-18 22:40:58 +000035extern struct group * bb_getgrent __P ((int grp_fd));
Eric Andersenab050f52001-01-27 06:01:43 +000036
37#endif /* USE_SYSTEM_PWD_GRP */
Eric Andersenbdfd0d72001-10-24 05:00:29 +000038#endif /* __CONFIG_GRP_H */
Eric Andersenab050f52001-01-27 06:01:43 +000039