1FGETGRENT(3)               Linux Programmer's Manual              FGETGRENT(3)
2
3
4

NAME

6       fgetgrent - get group file entry
7

SYNOPSIS

9       #include <stdio.h>
10       #include <sys/types.h>
11       #include <grp.h>
12
13       struct group *fgetgrent(FILE *stream);
14

DESCRIPTION

16       The  fgetgrent()  function  returns a pointer to a structure containing
17       the group information from the file  stream.   The  first  time  it  is
18       called  it  returns  the first entry; thereafter, it returns successive
19       entries.  The file stream must have the same format as /etc/group.
20
21       The group structure is defined in <grp.h> as follows:
22
23              struct group {
24                      char    *gr_name;        /* group name */
25                      char    *gr_passwd;      /* group password */
26                      gid_t   gr_gid;          /* group ID */
27                      char    **gr_mem;        /* group members */
28              };
29

RETURN VALUE

31       The fgetgrent() function returns the group  information  structure,  or
32       NULL if there are no more entries or an error occurs.
33

ERRORS

35       ENOMEM Insufficient memory to allocate group information structure.
36

CONFORMING TO

38       SVr4
39

SEE ALSO

41       endgrent(3),  fgetgrent_r(3),  getgrent(3),  getgrgid(3),  getgrnam(3),
42       putgrent(3), setgrent(3)
43
44
45
46GNU                               1993-04-04                      FGETGRENT(3)
Impressum