Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
setgrent(3) Guardian Native C Library Calls Reference Manual
NAME
setgrent - Resets the group name key to get group information from the group database
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZSECSRL
G-series native OSS processes: /G/system/sysnn/zsecsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZSECDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zsecdll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ysecdll
SYNOPSIS
#include <grp.h>
void setgrent(void);
DESCRIPTION
The getgrent(), getgrgid(), getgrnam(), setgrent(), and endgrent() functions are used to
access group attributes.
The getgrent() function returns information about the next group in the database.
The getgrgid() function returns information about the group in the database whose group ID
matches the value specified in the gid parameter.
The getgrnam() function returns information about the group in the database whose group name
matches the name specified in the name parameter.
The setgrent() function resets the group name key so that the next call to getgrent() returns
information for the first group entry in the database. The setgrent() function can be called only
by native processes.
The endgrent() function resets the group name key so that the next call to getgrent() returns
information for the first group entry in the database.
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.
RETURN VALUES
The value [ENOMEM] is returned if the system was unable to allocate sufficient memory for a
control block.
The setgrent() function does not set errno.
RELATED INFORMATION
Functions: endgrent(3), getgrent(3), getgrgid(3), getgrnam(3), getpwent(3).
STANDARDS CONFORMANCE
The following is an HP extension to the XPG4 Version 2 specification:
• The value [ENOMEM] can be returned.
6−28 Hewlett-Packard Company 527192-018