INITGROUPS(3X)
NAME
initgroups − initialize group access list
USAGE
initgroups(name, basegid) char *name; int basegid;
DESCRIPTION
Initgroups reads through the group file and sets up, using the setgroups(2) call, the group access list for the user specified in name. The basegid is included automatically in the groups list. Typically, this value is the group number from the password file.
NOTES
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.
The /etc/group file must be kept up-to-date. On DOMAIN/IX Systems, the program /etc/crpasswd handles this chore.
DIAGNOSTICS
Initgroups returns -1 if the process is not super-user.
FILES
/etc/group the group file