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.