setgroups(S) 6 January 1993 setgroups(S) Name setgroups - set supplementary group ID's Syntax cc . . . -lc #include <sys/types.h> int setgroups(gidsetsize, grouplist) int gidsetsize; gid_t *grouplist; Description The setgroups routine sets the supplementary group access list of the calling process according to the array argument grouplist. The argument gidsetsize indicates the number of entries in the array and must be no larger than the current value of the constant NGROUPS. NGROUPS is a tun- able kernel parameter. Only the super user may set supplemental group ID's. Return value Upon successful completion, setgroups returns a value of 0. Otherwise, setgroups returns a value of -1 and errno is set to indicate the appropriate error. Diagnostics If one of the following conditions occurs, setgroups fails and errno is set to the corresponding value: [EFAULT] The address specified for grouplist is outside the process address space. [EINVAL] The gidsetsize parameter is less than zero or greater than NGROUPS. [EINVAL] An element of grouplist is out of range. [EPERM] The caller is not the super user. [EPERM] The login UID has not yet been set for the calling process. See also getgroups(S), setluid(S), sysconf(S) Standards conformance The setgroups routine is an extension of AT&T System V provided by the Santa Cruz Operation.