Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

getgrgid_r(3) OSS Library Calls Reference Manual
NAME
getgrgid_r - Gets group information from the group database (reentrant)
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series and J-series native Guardian processes that do not use Standard POSIX Threads:
$SYSTEM.ZDLLnnn.ZSECDLL
32-bit H-series and J-series OSS processes that do not use Standard POSIX Threads: |
/G/system/zdllnnn/zsecdll |
64-bit H-series and J-series OSS processes that do not use Standard POSIX Threads: |
/G/system/zdllnnn/ysecdll |
H-series and J-series OSS processes that use the Standard POSIX Threads Library:
/G/system/zdllnnn/zsptdll
(See NOTES)
SYNOPSIS
[#include <sys/types.h>] /* optional except for POSIX.1 */
#include <grp.h>
[#include <spthread.h>] /* Required if using Standard POSIX Threads Library */
int getgrgid_r (
gid_t gid ,
struct group *grp,
char *buffer,
size_t buflen,
struct group **result);
PARAMETERS
gid Specifies the group ID of the group for which information is to be retrieved.
grp Points to a struct group structure allocated by the caller.
buffer Points to the buffer supplied by the caller and used as a storage space for grp
data.
buflen Specifies the size of the buffer passed in bytes.
result Points to the struct group that is returned in the grp parameter.
DESCRIPTION
The getgrgid_r( ) function is the reentrant version of the getgrgid( ) function.
The getgrgid_r( ) function returns information about the group in the database whose group ID
matches the value specified in the gid parameter.
The getgrgid_r( ) function updates the group structure pointed to by grp and stores a pointer to
that structure at the location pointed to by result. The structure contains an entry from the group
database with a matching gid. Storage referenced by the group structure is allocated from the
memory provided with the buffer parameter, which is buflen characters in size. If an error occurs
or if the requested entry cannot be found, a null pointer is returned at the location pointed to by
result.
Database Structure
Traditional UNIX implementations access user and group information by sequentially reading
unstructured files. In contrast, an HP NonStop server stores user and group information in struc-
tured, key-sequenced, Enscribe files.
342 Hewlett-Packard Company 527187-017