Name
setgroups -- set list of supplementary group IDs
Synopsis
#define __USE_BSD
#include <grp.h>
int setgroups(size_t size, const gid_t *list); |
Description
Sets the supplementary groups for the process.
Only the super-user may use this function.
Return Value
On success, zero is returned. On error, -1 is
returned, and 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).
Bugs
The __USE_BSD flag probably shouldn't be required for setgroups.