4.3BSD-UWisc/man/cat2/setgroups.2

Compare this file to the similar file:
Show the results in this format:




SETGROUPS(2)        UNIX Programmer's Manual         SETGROUPS(2)



NAME
     setgroups - set group access list

SYNOPSIS
     #include <sys/param.h>

     setgroups(ngroups, gidset)
     int ngroups, *gidset;

DESCRIPTION
     _S_e_t_g_r_o_u_p_s sets the group access list of the current user
     process according to the array _g_i_d_s_e_t.  The parameter
     _n_g_r_o_u_p_s indicates the number of entries in the array and
     must be no more than NGROUPS, as defined in <_s_y_s/_p_a_r_a_m._h>.

     Only the super-user may set new groups.

RETURN VALUE
     A 0 value is returned on success, -1 on error, with a error
     code stored in _e_r_r_n_o.

ERRORS
     The _s_e_t_g_r_o_u_p_s call will fail if:

     [EPERM]        The caller is not the super-user.

     [EFAULT]       The address specified for _g_i_d_s_e_t is outside
                    the process address space.

SEE ALSO
     getgroups(2), initgroups(3X)

BUGS
     The _g_i_d_s_e_t array should be of type gid_t, but remains
     integer for compatibility with earlier systems.




















Printed 12/27/86          May 13, 1986                          1