Chapter Contents

Previous

Next
initgroups

initgroups



Initialize Supplementary Group IDs for a Process

Portability: SAS/C extension


SYNOPSIS
DESCRIPTION
RETURN VALUE
RELATED FUNCTIONS


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, OS/390 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.  [cautionend]


RETURN VALUE

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


RELATED FUNCTIONS

getgroupsbyname , setgroups


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.