blob: 87d4115ce68d64472b3284e1515e46d21906c880 [file] [log] [blame]
Eric Andersenab050f52001-01-27 06:01:43 +00001#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 Andersenab050f52001-01-27 06:01:43 +00008#include <sys/types.h>
9#include <features.h>
10#include <stdio.h>
11
12/* The group structure */
13struct 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 Andersened3ef502001-01-27 08:24:39 +000021extern void setgrent __P ((void));
22extern void endgrent __P ((void));
23extern struct group * getgrent __P ((void));
Eric Andersenab050f52001-01-27 06:01:43 +000024
Eric Andersened3ef502001-01-27 08:24:39 +000025extern struct group * getgrgid __P ((__const gid_t gid));
26extern struct group * getgrnam __P ((__const char * name));
Eric Andersenab050f52001-01-27 06:01:43 +000027
Eric Andersened3ef502001-01-27 08:24:39 +000028extern struct group * fgetgrent __P ((FILE * file));
Eric Andersenab050f52001-01-27 06:01:43 +000029
Eric Andersened3ef502001-01-27 08:24:39 +000030extern int setgroups __P ((size_t n, __const gid_t * groups));
31extern int initgroups __P ((__const char * user, gid_t gid));
Eric Andersenab050f52001-01-27 06:01:43 +000032
Eric Andersened3ef502001-01-27 08:24:39 +000033extern struct group * __getgrent __P ((int grp_fd));
Eric Andersenab050f52001-01-27 06:01:43 +000034
35#endif /* USE_SYSTEM_PWD_GRP */
36#endif /* __BB_GRP_H */
37