4.4BSD/usr/share/man/cat3/getgrouplist.0

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

GETGROUPLIST(3)             BSD Programmer's Manual            GETGROUPLIST(3)

NNAAMMEE
     ggeettggrroouupplliisstt - calculate group access list

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<uunniissttdd..hh>>

     _i_n_t
     ggeettggrroouupplliisstt(_c_o_n_s_t _c_h_a_r _*_n_a_m_e, _i_n_t _b_a_s_e_g_i_d, _i_n_t _*_g_r_o_u_p_s, _i_n_t _*_n_g_r_o_u_p_s);

DDEESSCCRRIIPPTTIIOONN
     The ggeettggrroouupplliisstt() function reads through the group file and calculates
     the group access list for the user specified in _n_a_m_e. The _b_a_s_e_g_i_d is au-
     tomatically included in the groups list.  Typically this value is given
     as the group number from the password file.

     The resulting group list is returned in the integer array pointed to by
     _g_r_o_u_p_s. The caller specifies the size of the _g_r_o_u_p_s array in the integer
     pointed to by _n_g_r_o_u_p_s; the actual number of groups found is returned in
     _n_g_r_o_u_p_s.

RREETTUURRNN VVAALLUUEESS
     The ggeettggrroouupplliisstt() function returns -1 if the size of the group list is
     too small to hold all the user's groups.  Here, the group array will be
     filled with as many groups as will fit.

FFIILLEESS
     /etc/group  group membership list

SSEEEE AALLSSOO
     setgroups(2),  initgroups(3)

HHIISSTTOORRYY
     The ggeettggrroouupplliisstt() function first appeared in 4.4BSD.

BBUUGGSS
     The ggeettggrroouupplliisstt() 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 ggeettggrroouupplliisstt().

4.4BSD                           June 9, 1993                                1