Standards / Extensions | C or C++ | Dependencies |
---|---|---|
z/OS® UNIX | both |
#define _OPEN_SYS
#include <sys/types.h>
#include <grp.h>
int setgroups(const int size, const gid_t list[]);
setgroups() sets the supplementary group IDs for the process to the list provided in the list array. The argument size gives the number of gid_t elements in list array. The maximum number of supplementary groups for a strictly conforming program is NGROUPS_MAX, as defined in <limits.h> Or, refer to sysconf() (see sysconf() — Determine system configuration options) for information on dynamically determining the number of supplementary groups allowed.
The caller of this function must be a superuser.
If successful, setgroups() returns 0.