DESCRIPTION
The getgrnam() function returns a pointer to a structure containing the group information from /etc/group for the entry that matches the group name name. The getgrgid() function returns a pointer to a structure containing the group information from /etc/group for the entry that matches the group gid gid.
The group structure is defined in <grp.h> as follows:
struct group {
char *gr_name; /* group name */
char *gr_passwd; /* group password */
gid_t gr_gid;/* group id */
char **gr_mem; /* group members */
};
"RETURN VALUE"
The getgrnam() and getgrgid() functions return a pointer to the group information structure, or NULL if the matching entry is not found or an error occurs. If an error occurs, errno is set appropriately. The return value may point to static area, and may be overwritten by subsequent calls.
ERRORS