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

OSS Library Calls (g - h) getgrnam_r(3)
NAME
getgrnam_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>]
#include <grp.h>
[#include <spthread.h>] /* Required if using Standard POSIX Threads Library */
int getgrnam_r (
const char *name,
struct group *grp,
char *buffer,
size_t buflen,
struct group **result);
PARAMETERS
name Specifies the group name 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 getgrnam_r( ) function is the reentrant version of the getgrnam( ) function.
The getgrnam_r( ) function returns information about the group in the database whose group
name matches the name specified in the name parameter.
This 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 name. Storage referenced by the group structure is allocated from the memory pro-
vided with the buffer parameter, which is buflen characters in size. A null pointer is returned at
the location pointed to by result if an error occurs or if the requested entry is not found.
Database Structure
Traditional UNIX implementations access user and group information by sequentially reading
unstructured files. In contrast, an HP NonStop server node stores user and group information in
structured, key-sequenced, Enscribe files.
527187-017 Hewlett-Packard Company 347