Open System Services System Calls Reference Manual (G06.28+)

getgrnam_r(2) OSS System Calls Reference Manual
gr_gid The group ID of the group.
gr_mem The members of the group.
Open System Services 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 eld 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 the following conditions occurs, the getgrnam_r() function returns the corresponding
value:
[EAGAIN] A system resource is temporarily unavailable. The function cannot allocate
sufcient heap space to complete the call.
[EINVAL] The value specied for the name parameter contains invalid characters or cannot
be passed in the call for other reasons.
[EIO] A disk process or le system input or output error occurred. Data might have
been lost during the transfer.
[ENAMETOOLONG]
The value specied 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 specied group name does not exist, or the name parameter points to an
empty string.
[ENOMEM] There is insufcient user memory to complete the call.
[ERANGE] Insufcient storage was supplied via buffer and buen 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 specication. 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 le spthread.h is an HP exception to the POSIX standard.
352 Hewlett-Packard Company 527186-005