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

DESCRIPTION

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

RETURN VALUE

22       The  initgroups()  function  returns  0  on  success.   On error, -1 is
23       returned, and errno is set appropriately.
24

ERRORS

26       ENOMEM Insufficient memory to allocate group information structure.
27
28       EPERM  The calling process has insufficient privilege. See the underly‐
29              ing system call setgroups(2).
30

FILES

32       /etc/group          group database file
33

CONFORMING TO

35       SVr4, 4.3BSD
36

NOTES

38       The  prototype  for  initgroups()  is  only available if _BSD_SOURCE is
39       defined.
40

SEE ALSO

42       getgroups(2), setgroups(2)
43
44
45
46GNU                               2004-10-10                     INITGROUPS(3)
Impressum