COHERENT manpages
This page displays the COHERENT manpage for setgroups() [Set the supplemental group-access list].
List of available manpages
Index
setgroups() -- System Call (libc) Set the supplemental group-access list #include <unistd.h> int setgroups(ngroups, grouplist) int ngroups; const gid_t *grouplist; The ``supplemental group-access list'' is the list of group identifiers that are used in addition to the effective group identifier when determining the level of access that a process has to a file. setgroups() fills the calling process's supplemental group-access list with the group identifiers in the array to which grouplist points. ngroups gives the number of identifiers in the array, and cannot exceed NGROUPS_MAX. If all goes well, setgroups() returns zero. It fails and returns -1 if any of the following occur: -> The value of ngroups exceeds NGROUPS_MAX. setgroups sets errno to EINVAL. -> The effective user identifier is not that of the super-user root. setgroups() sets errno to EPERM. -> grouplist contains an illegal address. setgroups() sets errno to EFAULT. See Also getgroups(), initgroups(), libc, limits.h, unistd.h Notes This function may be invoked only by the superuser root.