2001-01-27 11:31:43 +05:30
|
|
|
#ifndef __BB_GRP_H
|
|
|
|
#define __BB_GRP_H
|
|
|
|
|
|
|
|
#if defined USE_SYSTEM_PWD_GRP
|
|
|
|
#include <grp.h>
|
|
|
|
#else
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <features.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
/* 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 13:54:39 +05:30
|
|
|
extern void setgrent __P ((void));
|
|
|
|
extern void endgrent __P ((void));
|
|
|
|
extern struct group * getgrent __P ((void));
|
2001-01-27 11:31:43 +05:30
|
|
|
|
2001-01-27 13:54:39 +05:30
|
|
|
extern struct group * getgrgid __P ((__const gid_t gid));
|
|
|
|
extern struct group * getgrnam __P ((__const char * name));
|
2001-01-27 11:31:43 +05:30
|
|
|
|
2001-01-27 13:54:39 +05:30
|
|
|
extern struct group * fgetgrent __P ((FILE * file));
|
2001-01-27 11:31:43 +05:30
|
|
|
|
2001-01-27 13:54:39 +05:30
|
|
|
extern int setgroups __P ((size_t n, __const gid_t * groups));
|
|
|
|
extern int initgroups __P ((__const char * user, gid_t gid));
|
2001-01-27 11:31:43 +05:30
|
|
|
|
2001-01-27 13:54:39 +05:30
|
|
|
extern struct group * __getgrent __P ((int grp_fd));
|
2001-01-27 11:31:43 +05:30
|
|
|
|
|
|
|
#endif /* USE_SYSTEM_PWD_GRP */
|
|
|
|
#endif /* __BB_GRP_H */
|
|
|
|
|