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

NAME

6       initgroups - initialize the supplementary group access list
7

SYNOPSIS

9       #include <sys/types.h>
10       #include <grp.h>
11
12       int initgroups(const char *user, gid_t group);
13
14   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
15
16       initgroups(): _BSD_SOURCE
17

DESCRIPTION

19       The  initgroups() function initializes the group access list by reading
20       the group database /etc/group and using all groups of which user  is  a
21       member.  The additional group group is also added to the list.
22
23       The user argument must be non-NULL.
24

RETURN VALUE

26       The  initgroups()  function  returns  0  on  success.   On error, -1 is
27       returned, and errno is set appropriately.
28

ERRORS

30       ENOMEM Insufficient memory to allocate group information structure.
31
32       EPERM  The calling process has insufficient privilege.  See the  under‐
33              lying system call setgroups(2).
34

FILES

36       /etc/group          group database file
37

CONFORMING TO

39       SVr4, 4.3BSD.
40

SEE ALSO

42       getgroups(2), setgroups(2), credentials(7)
43

COLOPHON

45       This  page  is  part of release 3.25 of the Linux man-pages project.  A
46       description of the project, and information about reporting  bugs,  can
47       be found at http://www.kernel.org/doc/man-pages/.
48
49
50
51GNU                               2007-07-26                     INITGROUPS(3)
Impressum