INITGROUPS(3) BSD Programmer's Manual INITGROUPS(3) NNAAMMEE iinniittggrroouuppss - initialize group access list SSYYNNOOPPSSIISS ##iinncclluuddee <<uunniissttdd..hh>> _i_n_t iinniittggrroouuppss(_c_o_n_s_t _c_h_a_r _*_n_a_m_e, _i_n_t _b_a_s_e_g_i_d); DDEESSCCRRIIPPTTIIOONN The iinniittggrroouuppss() function uses the getgrouplist(3) function to calculate the group access list for the user specified in _n_a_m_e. This group list is then setup for the current process using setgroups(2). The _b_a_s_e_g_i_d is automatically included in the groups list. Typically this value is given as the group number from the password file. RREETTUURRNN VVAALLUUEESS The iinniittggrroouuppss() function returns -1 if it was not invoked by the super- user. SSEEEE AALLSSOO setgroups(2), getgrouplist(3) HHIISSTTOORRYY The iinniittggrroouuppss function appeared in 4.2BSD. BBUUGGSS The ggeettggrroouupplliisstt() function called by iinniittggrroouuppss 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 iinniittggrroouuppss(). 4.2 Berkeley Distribution June 4, 1993 1