Set supplementary group IDs
#include <unistd.h> int setgroups( int ngroups, const gid_t *gidset );
- The number of entries in the gidset array.
- An array of the supplementary group IDs that you want to assign to the current user. This number of entries in this array can't exceed sysconf(_SC_NGROUPS_MAX).
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.
0, or -1 if an error occurred (errno is set).
- The gidset argument isn't a valid pointer.
- The calling process doesn't have the required permission; see procmgr_ability().
Last modified: 2013-09-30