sseettggrroouuppss() -- System Call (libc)

Set the supplemental group-access list
#iinncclluuddee <uunniissttdd.hh>
iinntt sseettggrroouuppss(_n_g_r_o_u_p_s, _g_r_o_u_p_l_i_s_t)
iinntt _n_g_r_o_u_p_s; ccoonnsstt ggiidd_tt *_g_r_o_u_p_l_i_s_t;

The  ``supplemental group-access  list'' is the  list of  group identifiers
that  are  used  in   addition  to  the  effective  group  identifier  when
determining the level of access that  a process has to a file.  sseettggrroouuppss()
fills the  calling process's supplemental group-access  list with the group
identifiers  in the  array to  which _g_r_o_u_p_l_i_s_t  points.  _n_g_r_o_u_p_s  gives the
number of identifiers in the array, and cannot exceed NNGGRROOUUPPSS_MMAAXX.

If all goes well, sseettggrroouuppss() returns zero.  It fails and returns -1 if any
of the following occur:

-> The  value  of  _n_g_r_o_u_p_s exceeds  NNGGRROOUUPPSS_MMAAXX.  sseettggrroouuppss  sets eerrrrnnoo  to
   EEIINNVVAALL.

-> The  effective  user identifier  is  not that  of  the super-user  rroooott.
   sseettggrroouuppss() sets eerrrrnnoo to EEPPEERRMM.

-> _g_r_o_u_p_l_i_s_t  contains  an  illegal  address.   sseettggrroouuppss() sets  eerrrrnnoo  to
   EEFFAAUULLTT.

_S_e_e _A_l_s_o
ggeettggrroouuppss(), iinniittggrroouuppss(), lliibbcc, lliimmiittss.hh, uunniissttdd.hh

_N_o_t_e_s
This function may be invoked only by the superuser rroooott.
