grp.h File

Purpose

Describes group structure.

Syntax

#include <grp.h>

Description

The grp.h header declares the structure group that includes the following members:

char    *gr_name  the name of the group
gid_t    gr_gid   numerical group ID
char   **gr_mem   pointer to a null-terminated array of character pointers to member names

The gid_t type is defined as described in the sys/types.h header file.

The following are declared as functions and may also be defined as macros. Function prototypes must be provided for use with an ISO C compiler.

struct group  *getgrgid(gid_t);
struct group  *getgrnam(const char *);
int            getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
int            getgrnam_r(const char *, struct group *, char *, size_t, struct group **); 
struct group  *getgrent(void);
void           endgrent(void);
void           setgrent(void);