Open System Services System Calls Reference Manual (G06.28+, H06.05+)
getgrnam_r(2) OSS System Calls Reference Manual
gr_gid The group ID of the group.
gr_mem The members of the group.
OSS supports the following POSIX.1-compliant
group declaration:
struct group {
char *gr_name;
char *gr_passwd;
gid_t gr_gid;
char **gr_mem;
};
The gr_passwd field is provided for compatibility with some versions of UNIX, but it always
contains a null string.
RETURN VALUES
Upon successful completion, the getgrnam_r() function returns 0 (zero). Otherwise, the func-
tion returns an error number, as described in the ERRORS subsection of this reference page.
ERRORS
If any of these conditions occur, the getgrnam_r() function returns the corresponding value:
[EAGAIN] A system resource is temporarily unavailable. The function cannot allocate
sufficient heap space to complete the call.
[EINVAL] The value specified for the name parameter contains invalid characters or cannot
be passed in the call for other reasons.
[EIO] A disk process or file system input or output error occurred. Data might have
been lost during the transfer.
[ENAMETOOLONG]
The value specified for the name parameter exceeds the maximum number of
characters allowed for a group name.
[ENOCRE] The calling process does not use the Common Run-Time Environment (CRE)
but requested a service that requires CRE (the static area cannot be allocated in
the calling process).
[ENOENT] The specified group name does not exist, or the name parameter points to an
empty string.
[ENOMEM] There is insufficient user memory to complete the call.
[ERANGE] Insufficient storage was supplied via buffer and buflen to contain the data to be
referenced by the resulting group structure.
RELATED INFORMATION
Functions: getgrgid(3), getgrgid_r(2), getgrnam(3), getpwent(3), getpwent_r(2).
STANDARDS CONFORMANCE
This function is an extension to the UNIX98 specification. Interfaces documented on this refer-
ence page conform to the following industry standards:
• IEEE Std 1003.1c-1995, POSIX System Application Program Interface
The use of the header file spthread.h is an HP exception to the POSIX standard.
3−72 Hewlett-Packard Company 527186-007