*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> initgroups (3)              



NAME    [Toc]    [Back]

     initgroups - initialize supplementary group IDs

SYNOPSIS    [Toc]    [Back]

     #include <unistd.h>

     initgroups(const char *name, gid_t basegid);

DESCRIPTION    [Toc]    [Back]

     The initgroups() function uses the getgrouplist(3)  function
to calculate
     the  supplementary group IDs for the user specified in name.
This group
     list is then set up  for  the  current  process  using  setgroups(2).  The
     basegid  is automatically included in the group list.  Typically this value
 is given as the group number from the password file.

     If the groups database lists more than  NGROUPS  groups  for
name (including
     one for basegid), the later groups are ignored.

RETURN VALUES    [Toc]    [Back]

     The  initgroups()  function returns -1 if it was not invoked
by the superuser.

SEE ALSO    [Toc]    [Back]

     setgroups(2), getgrouplist(3)

HISTORY    [Toc]    [Back]

     The initgroups() function appeared in 4.2BSD.

BUGS    [Toc]    [Back]

     The getgrouplist(3) function called by initgroups() uses the
     based  on  getgrent(3).  If the invoking program uses any of
these routines,
 the group structure will be overwritten in  the  call

OpenBSD      3.6                           June      4,      1993
[ Back ]
 Similar pages
Name OS Title
initgroups Linux initialize the supplementary group access list
pxfgetgroups IRIX Gets supplementary group IDs
getgroups Linux get/set list of supplementary group IDs
getgroups Tru64 Get the supplementary group IDs of the current process
getgroups IRIX get supplementary group access list IDs
initgroups Tru64 Initialize concurrent group set
initgroups IRIX initialize group access list
initgroups FreeBSD initialize group access list
getwidth IRIX get information on supplementary code sets
wctype IRIX classify ASCII and supplementary code set characters
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service