setgroups(2) CLIX setgroups(2)
NAME
setgroups - Gets the concurrent group set of the current process
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
#include <types.h>
int setgroups(
int gidsetsize ,
gid_t *grouplist );
PARAMETERS
gidsetsize Indicates the number of entries that can be stored in the
array to which the grouplist parameter points.
grouplist Points to the array in which the process's supplementary
group IDs are stored.
DESCRIPTION
The setgroups() function sets the group access list of the current user
process according to the array grouplist. The gidsetsize parameter
indicates the number of entries in the array and must be no more than
NGROUPS, as defined in the <param.h> header file.
NOTES
Only the superuser may execute the setgroups() function.
RETURN VALUES
Upon successful completion, setgroups() returns 0. If setgroups() fails,
a value of -1 is returned and the global variable errno is set to indicate
the error.
ERRORS
The setgroups() function fails if the following is true:
[EINVAL] The size of the grouplist array exceeds the size of the
process's supplementary group array.
RELATED INFORMATION
Functions: getgroups(2), getgid(2), setgid(2), initgroups(3)
2/94 - Intergraph Corporation 1