Seth Woolley's Man Viewer

initgroups(3) - initgroups, initgroups - initialize the supplementary group access list - man 3 initgroups

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

INITGROUPS(3)              Linux Programmer's Manual             INITGROUPS(3)



NAME
       initgroups - initialize the supplementary group access(2,5) list

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

       int initgroups(const char *user, gid_t group);

DESCRIPTION
       The  initgroups() function initializes the group access(2,5) list by reading
       the group database /etc/group and using all groups of which user  is  a
       member.  The additional group group is also added to the list.

       The user argument must be non-NULL.

RETURN VALUE
       The  initgroups()  function  returns  0  on  success, or -1 if(3,n) an error(8,n)
       occurs.

ERRORS
       ENOMEM Insufficient memory to allocate group information structure.

       EPERM  The calling process has insufficient privilege. See the underly-
              ing system call setgroups(2).

FILES
       /etc/group          group database file(1,n)

CONFORMING TO
       SVID 3, BSD 4.3

NOTES
       The  prototype  for  initgroups  is  only  available  if(3,n) _BSD_SOURCE is
       defined  (either   explicitly,   or   implicitly,   by   not   defining
       _POSIX_SOURCE or compiling with the -ansi flag).

SEE ALSO
       getgroups(2), setgroups(2)



GNU                               2004-10-10                     INITGROUPS(3)

References for this manual (incoming links)