setgroups
Name
setgroups -- set list of supplementary group IDs
Synopsis
int
setgroups
(size_t
size, const gid_t
*list);
Description
setgroups sets the supplementary groups for
the process. Only the super-user may use this function.
Return Value
On success, 0 is returned.
On error, -1 is returned and
the global variable errno is set appropriately.
Errors
- EFAULT
list has an invalid address.
- EPERM
The user is not the super-user.
- EINVA
size is greater than NGROUPS
(32 for Linux 2.0.32).