SETGROUPS(2) — HP-UX
Series 300, 800 Only
NAME
setgroups − set group access list
SYNOPSIS
#include <sys/param.h>
setgroups(ngroups, gidset)
int ngroups, *gidset;
DESCRIPTION
Setgroups sets the group access list of the current user process according to the array gidset. The parameter ngroups indicates the number of entries in the array and must be no more than NGROUPS, as defined in <sys/param.h>.
Only the superuser may set new groups by adding to the group access list of the current user process; any user may delete groups from it.
RETURN VALUE
A 0 value is returned on success, −1 on error, with an error code stored in errno.
ERRORS
The setgroups call will fail if:
[EPERM] The caller is not the superuser and has attempted to set new groups.
[EFAULT] The address specified for gidset is outside the process address space. The reliable detection of this error will be implementation dependent.
[EINVAL] Ngroups is greater than NGROUPS or not positive.
[EINVAL] An entry in gidset is not a valid group ID.
AUTHOR
Setgroups was developed by the University of California, Berkeley California, Computer Science Division, Department of Electrical Engineering and Computer Science.
SEE ALSO
Hewlett-Packard Company — Version B.1, May 11, 2021