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

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



NAME    [Toc]    [Back]

     initgroups -- initialize group access list

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

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 group access list for the user specified in name.  This group list is
     then setup for the current process using setgroups(2).  The basegid is
     automatically included in the groups list.  Typically this value is given
     as the group number from the password file.

RETURN VALUES    [Toc]    [Back]

     The initgroups() function returns the value 0 if successful; otherwise
     the value -1 is returned and the global variable errno is set to indicate
     the error.

ERRORS    [Toc]    [Back]

     The initgroups() function may fail and set errno for any of the errors
     specified for the library function setgroups(2).

SEE ALSO    [Toc]    [Back]

     setgroups(2), getgrouplist(3)

HISTORY    [Toc]    [Back]

     The initgroups() function appeared in 4.2BSD.

BUGS    [Toc]    [Back]

     The getgrouplist() function called by initgroups() 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

FreeBSD 5.2.1			 June 4, 1993			 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
initgroups Linux initialize the supplementary group access list
getgroups FreeBSD get group access list
getgroups NetBSD get group access list
setgroups NetBSD set group access list
getgroups HP-UX get group access list
setgroups OpenBSD set group access list
getgroups OpenBSD get group access list
setgroups Tru64 Set the group access list
setgroups FreeBSD set group access list
setgroups HP-UX set group access list
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service