initgroups -- Initialize Supplementary Group IDs for a Process

SYNOPSIS

 #include <sys/types.h>
 #include <grp.h>

 int initgroups(const char *userID, gid_t groupID);
 

DESCRIPTION

initgroups initializes the supplementary group ID list for a process to a user's supplementary group list. The user is identified by the userID argument, which is a 1 to 8 character, null-terminated, MVS user ID. The group ID specified by the groupID argument is added to the supplementary list for the process.

Note: This function can only be called by a superuser.

RETURN VALUE

initgroups returns a 0 if successful and a -1 if unsuccessful.

RELATED FUNCTIONS

getgroupsbyname, setgroups


Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.