![]() |
![]() |
![]() |
Set supplementary group IDs
#include <unistd.h> int setgroups( int ngroups, const gid_t *gidset );
libc
The setgroups() function sets the group access list of the current user to the array of group IDs in gidset. There will be at least ngroups group IDs in gidset, and must be less than or equal to NGROUPS_MAX.
Only root can set new groups.
0, or -1 if an error occurred (errno is set).
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | No |
Thread | No |
![]() |
![]() |
![]() |