blob: 191c2d4e5fe902b8a73e6d152dd3ad1a86fb0cf9 [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
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 */
Eric Andersenbdfd0d72001-10-24 05:00:29 +000036#endif /* __CONFIG_GRP_H */
Eric Andersenab050f52001-01-27 06:01:43 +000037