fgetgrent - get group file entry


   #include <stdio.h>
   #include <sys/types.h>
   #include <grp.h>

   struct group *fgetgrent(FILE *stream);

   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

       Since glibc 2.19:
       Glibc 2.19 and earlier:


   The  fgetgrent()  function  returns a pointer to a structure containing
   the group information from the file referred to by stream.   The  first
   time  it  is  called it returns the first entry; thereafter, it returns
   successive entries.  The file referred to by stream must have the  same
   format as /etc/group (see group(5)).

   The group structure is defined in <grp.h> as follows:

       struct group {
           char   *gr_name;        /* group name */
           char   *gr_passwd;      /* group password */
           gid_t   gr_gid;         /* group ID */
           char  **gr_mem;         /* NULL-terminated array of pointers
                                      to names of group members */


   The  fgetgrent()  function  returns  a pointer to a group structure, or
   NULL if there are no more entries or an error occurs.  In the event  of
   an error, errno is set to indicate the cause.


   ENOMEM Insufficient memory to allocate group structure.


   For   an   explanation   of   the  terms  used  in  this  section,  see

   Interface    Attribute      Value                    
   fgetgrent()  Thread safety  MT-Unsafe race:fgetgrent 




   endgrent(3),  fgetgrent_r(3),   fopen(3),   getgrent(3),   getgrgid(3),
   getgrnam(3), putgrent(3), setgrent(3), group(5)


   This  page  is  part of release 4.09 of the Linux man-pages project.  A
   description of the project, information about reporting bugs,  and  the
   latest     version     of     this    page,    can    be    found    at

More Linux Commands

dgst(1ssl) - message digests (Commands - Linux man page)....
The digest functions output the message digest of a supplied file or files in hexadecimal. The digest functions also generate and verify digital signatures usin

index(3) - locate character in string - Linux manual page...
The index() function returns a pointer to the first occurrence of the character c in the string s. The rindex() function returns a pointer to the last occurrenc

is(n) - test argument to see if it is a class or an object
The is command is used to check if the argument given is a class or an object; depending on the option given. If the argument if a class or object, then 1 is re

MIME::Decoder::Binary(3pm) - perform no encoding/decoding...
A MIME::Decoder subclass for the binary encoding (in other words, no encoding). The binary decoder is a special case, since its ill-advised to read the input li

glTexImage1D(3gl) - specify a one-dimensional texture image
Texturing maps a portion of a specified texture image onto each graphical primitive for which texturing is enabled. To enable and disable one-dimensional textur

stdscr(3ncurses) - curses global variables - Linux man page
This page summarizes variables provided by the curses library. A more complete description is given in the curses(3X) manual page. Depending on the configuratio

bind_textdomain_codeset(3) - set encoding of message transla
The bind_textdomain_codeset function sets the output codeset for message catalogs for domain domainname. A message domain is a set of translatable msgid message

CMSG_SPACE(3) - Access ancillary data - Linux manual page...
These macros are used to create and access control messages (also called ancillary data) that are not a part of the socket payload. This control information may

sasl_server_init(3) - SASL server authentication initializat
sasl_server_init() initializes SASL. It must be called before any calls to sasl_server_start, and only once per process. This call initializes all SASL mechanis

XSetWMName(3) - set or read a window's WM_NAME property.....
The XSetWMName convenience function calls XSetTextProperty to set the WM_NAME property. The XGetWMName convenience function calls XGetTextProperty to obtain the

Tk_SetWindowBackgroundPixmap(3) - change window configuratio
These procedures are analogous to the X library procedures with similar names, such as XConfigureWindow. Each one of the above procedures calls the correspondin

installsieve(1) - user utility for managing sieve scripts...
installsieve is a utility that allows users to manage their sieve scripts kept on the server. OPTIONS -v &lt;name&gt; View script with the given name. The script if r

We can't live, work or learn in freedom unless the software we use is free.