Set supplementary group IDs
#include <unistd.h> int setgroups( int ngroups, const gid_t *gidset );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The setgroups() function sets the group access list of the current user to the array of group IDs in gidset.
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 |