
INITGROUPS(3)              UNIX Programmer's Manual              INITGROUPS(3)

NNAAMMEE
     iinniittggrroouuppss - initialize group access list

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<uunniissttdd..hh>>

     _i_n_t
     iinniittggrroouuppss(_c_o_n_s_t _c_h_a_r _*_n_a_m_e, _i_n_t _b_a_s_e_g_i_d)

DDEESSCCRRIIPPTTIIOONN
     The iinniittggrroouuppss() function reads through the group file and sets up, using
     the setgroups(2) call, the group access list for the user specified in
     _n_a_m_e. The _b_a_s_e_g_i_d is automatically included in the groups list.  Typical-
     ly this value is given as the group number from the password file.

RREETTUURRNN VVAALLUUEESS
     The iinniittggrroouuppss() function returns -1 if it was not invoked by the super-
     user.

FFIILLEESS
     /etc/group

SSEEEE AALLSSOO
     setgroups(2)

HHIISSTTOORRYY
     The iinniittggrroouuppss function appeared in 4.2BSD.

BBUUGGSS
     The iinniittggrroouuppss() function uses the routines based on getgrent(3).  If the
     invoking program uses any of these routines, the group structure will be
     overwritten in the call to iinniittggrroouuppss().

4.2 Berkeley Distribution       April 19, 1991                               1





























