2001-10-24 05:00:29 +00:00
|
|
|
#ifndef __CONFIG_GRP_H
|
|
|
|
#define __CONFIG_GRP_H
|
2001-01-27 06:01:43 +00:00
|
|
|
|
2002-06-04 20:10:23 +00:00
|
|
|
#if !defined CONFIG_USE_BB_PWD_GRP
|
2002-07-03 23:19:26 +00:00
|
|
|
#include <grp.h>
|
2002-06-04 20:10:23 +00:00
|
|
|
|
2001-01-27 06:01:43 +00:00
|
|
|
#else
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <features.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2002-06-04 20:10:23 +00:00
|
|
|
|
2001-01-27 06:01:43 +00:00
|
|
|
/* The group structure */
|
|
|
|
struct group
|
|
|
|
{
|
|
|
|
char *gr_name; /* Group name. */
|
|
|
|
char *gr_passwd; /* Password. */
|
|
|
|
gid_t gr_gid; /* Group ID. */
|
|
|
|
char **gr_mem; /* Member list. */
|
|
|
|
};
|
|
|
|
|
2001-01-27 08:24:39 +00:00
|
|
|
extern void setgrent __P ((void));
|
|
|
|
extern void endgrent __P ((void));
|
|
|
|
extern struct group * getgrent __P ((void));
|
2001-01-27 06:01:43 +00:00
|
|
|
|
2001-01-27 08:24:39 +00:00
|
|
|
extern struct group * getgrgid __P ((__const gid_t gid));
|
|
|
|
extern struct group * getgrnam __P ((__const char * name));
|
2001-01-27 06:01:43 +00:00
|
|
|
|
2001-01-27 08:24:39 +00:00
|
|
|
extern struct group * fgetgrent __P ((FILE * file));
|
2001-01-27 06:01:43 +00:00
|
|
|
|
2001-01-27 08:24:39 +00:00
|
|
|
extern int setgroups __P ((size_t n, __const gid_t * groups));
|
|
|
|
extern int initgroups __P ((__const char * user, gid_t gid));
|
2001-01-27 06:01:43 +00:00
|
|
|
|
2001-01-27 08:24:39 +00:00
|
|
|
extern struct group * __getgrent __P ((int grp_fd));
|
2001-01-27 06:01:43 +00:00
|
|
|
|
|
|
|
#endif /* USE_SYSTEM_PWD_GRP */
|
2001-10-24 05:00:29 +00:00
|
|
|
#endif /* __CONFIG_GRP_H */
|
2001-01-27 06:01:43 +00:00
|
|
|
|