home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3c / initgroups.z / initgroups
Encoding:
Text File  |  1998-10-20  |  4.2 KB  |  133 lines

  1.  
  2.  
  3.  
  4. IIIINNNNIIIITTTTGGGGRRRROOOOUUUUPPPPSSSS((((3333cccc))))                                                  IIIINNNNIIIITTTTGGGGRRRROOOOUUUUPPPPSSSS((((3333cccc))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      initgroups - initialize group access list
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.    _P_O_S_I_X:
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ttttyyyyppppeeeessss....hhhh>>>>
  14.  
  15.      iiiinnnntttt iiiinnnniiiittttggggrrrroooouuuuppppssss((((cccchhhhaaaarrrr ****nnnnaaaammmmeeee,,,, ggggiiiidddd____tttt bbbbaaaasssseeeeggggiiiidddd))));;;;
  16.  
  17.    _B_S_D:
  18.  
  19.      iiiinnnntttt BBBBSSSSDDDDiiiinnnniiiittttggggrrrroooouuuuppppssss((((cccchhhhaaaarrrr ****nnnnaaaammmmeeee,,,, iiiinnnntttt bbbbaaaasssseeeeggggiiiidddd))));;;;
  20.  
  21. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.      _i_n_i_t_g_r_o_u_p_s and _B_S_D_i_n_i_t_g_r_o_u_p_s read through the group file (////eeeettttcccc////ggggrrrroooouuuupppp) and
  23.      set up, using the appropriate version of the _s_e_t_g_r_o_u_p_s call, the group
  24.      access list for the user specified in _n_a_m_e.  The _b_a_s_e_g_i_d is automatically
  25.      included in the groups list.  Typically this value is the group number
  26.      from the password file.
  27.  
  28.      The difference between _i_n_i_t_g_r_o_u_p_s and _B_S_D_i_n_i_t_g_r_o_u_p_s is the type of the
  29.      _b_a_s_e_g_i_d parameter.  Both of these routines use the
  30.      _s_y_s_c_o_n_f(____SSSSCCCC____NNNNGGGGRRRROOOOUUUUPPPPSSSS____MMMMAAAAXXXX) system call to determine the maximum number of
  31.      groups at run-time.
  32.  
  33. FFFFIIIILLLLEEEESSSS
  34.      /etc/group
  35.      /etc/passwd
  36.  
  37. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  38.      multgrps(1), getgroups(2), setgroups(2), sysconf(3C)
  39.  
  40. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  41.      _i_n_i_t_g_r_o_u_p_s returns 0 if successful.  If the calling routine doesn't have
  42.      superuser privileges, it returns -1 and an error code is stored in global
  43.      integer _e_r_r_n_o.  If the specified user is a member of too many groups, the
  44.      process is initialized with the maximum-allowed groups: the remaining
  45.      groups are silently discarded by the system.  A special situation occurs
  46.      when _i_n_i_t_g_r_o_u_p_s is called on systems with multiple groups disabled (i.e.,
  47.      _n_g_r_o_u_p_s__m_a_x in <////vvvvaaaarrrr////ssssyyyyssssggggeeeennnn////mmmmaaaasssstttteeeerrrr....dddd////kkkkeeeerrrrnnnneeeellll> set to 0): in this case
  48.      _i_n_i_t_g_r_o_u_p_s returns -1 and _e_r_r_n_o is set to EEEEIIIINNNNVVVVAAAALLLL.
  49.  
  50. EEEERRRRRRRROOOORRRRSSSS
  51.      The _i_n_i_t_g_r_o_u_p_s call will fail if:
  52.  
  53.      [EPERM]        The caller is not the super-user.
  54.  
  55.      [EINVAL]       The multiple-group facility is disabled on the system.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. IIIINNNNIIIITTTTGGGGRRRROOOOUUUUPPPPSSSS((((3333cccc))))                                                  IIIINNNNIIIITTTTGGGGRRRROOOOUUUUPPPPSSSS((((3333cccc))))
  71.  
  72.  
  73.  
  74. BUGS
  75.      _i_n_i_t_g_r_o_u_p_s uses the routines based on _g_e_t_g_r_e_n_t(3).  If the invoking
  76.      program uses any of these routines, the group structure will be
  77.      overwritten in the call to _i_n_i_t_g_r_o_u_p_s.
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.