1SETGROUPS(2)                  System Calls Manual                 SETGROUPS(2)
2
3
4

NAME

6       setgroups - set group access list
7

SYNOPSIS

9       #include <sys/param.h>
10
11       setgroups(ngroups, gidset)
12       int ngroups, *gidset;
13

DESCRIPTION

15       Setgroups  sets  the  group  access  list  of  the current user process
16       according to the array gidset.  The  parameter  ngroups  indicates  the
17       number  of  entries  in  the array and must be no more than NGROUPS, as
18       defined in <sys/param.h>.
19
20       Only the super-user may set new groups.
21

RETURN VALUE

23       A 0 value is returned on success, -1 on error, with a error code stored
24       in errno.
25

ERRORS

27       The setgroups call will fail if:
28
29       [EPERM]        The caller is not the super-user.
30
31       [EFAULT]       The  address specified for gidset is outside the process
32                      address space.
33

SEE ALSO

35       getgroups(2), initgroups(3X)
36

BUGS

38       The gidset array should be of type gid_t, but remains integer for  com‐
39       patibility with earlier systems.
40
41
42
434.2 Berkeley Distribution        May 13, 1986                     SETGROUPS(2)
Impressum