initgroups man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



INITGROUPS(3c)							INITGROUPS(3c)

NAME
     initgroups - initialize group access list

SYNOPSIS
   POSIX:
     #include <sys/types.h>

     int initgroups(char *name, gid_t basegid);

   BSD:

     int BSDinitgroups(char *name, int basegid);

DESCRIPTION
     initgroups and BSDinitgroups read through the group file (/etc/group) and
     set up, using the appropriate version of the setgroups call, the group
     access list for the user specified in name.  The basegid is automatically
     included in the groups list.  Typically this value is the group number
     from the password file.

     The difference between initgroups and BSDinitgroups is the type of the
     basegid parameter.	 Both of these routines use the
     sysconf(_SC_NGROUPS_MAX) system call to determine the maximum number of
     groups at run-time.

FILES
     /etc/group
     /etc/passwd

SEE ALSO
     multgrps(1), getgroups(2), setgroups(2), sysconf(3C)

DIAGNOSTICS
     initgroups returns 0 if successful.  If the calling routine doesn't have
     superuser privileges, it returns -1 and an error code is stored in global
     integer errno.  If the specified user is a member of too many groups, the
     process is initialized with the maximum-allowed groups: the remaining
     groups are silently discarded by the system.  A special situation occurs
     when initgroups is called on systems with multiple groups disabled (i.e.,
     ngroups_max in </var/sysgen/master.d/kernel> set to 0): in this case
     initgroups returns -1 and errno is set to EINVAL.

ERRORS
     The initgroups call will fail if:

     [EPERM]	    The caller is not the super-user.

     [EINVAL]	    The multiple-group facility is disabled on the system.

									Page 1

INITGROUPS(3c)							INITGROUPS(3c)

BUGS
     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 initgroups.

									Page 2

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net