*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: getgrent | Section: 3 | Source: UNIX v10 | File: getgrent.3
GETGRENT(3) Library Functions Manual GETGRENT(3) NAME getgrent, getgrgid, getgrnam, setgrent, endgrent - get group file entry SYNOPSIS #include <grp.h> struct group *getgrent(); struct group *getgrgid(gid) struct group *getgrnam(name) char *name; int setgrent(); int endgrent(); DESCRIPTION Getgrent, getgrgid and getgrnam each return pointers to a structure containing the broken-out fields of a line in struct group { char *gr_name; the group name char *gr_passwd; the encrypted group passwd int gr_gid; the numeric groupid char **gr_mem; null-terminated vector of pointers to the individual member names }; Getgrent simply reads the next line while getgrgid and getgrnam search until a matching gid or name is found (or until EOF is encountered). Each routine picks up where the others leave off so successive calls may be used to search the entire file. A call to setgrent has the effect of rewinding the group file to allow repeated searches. Endgrent may be called to close the group file when processing is complete. FILES SEE ALSO getlogin(3), getpwent(3), passwd(5) DIAGNOSTICS Zero is returned on EOF or error. BUGS The return values point to static data whose content is overwritten by each call. GETGRENT(3)

Navigation Options