Chapter Contents

Previous

Next
setgroups

setgroups



Set Supplementary Group IDs

Portability: SAS/C extension


SYNOPSIS
DESCRIPTION
RETURN VALUE
RELATED FUNCTIONS


SYNOPSIS

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

int setgroups(int listSize, const gid_t groupList[]);


DESCRIPTION

setgroups sets the supplementary group ID list for the calling process to the list provided by the groupList argument. listSize specifies the size of the groupList array. The size of groupList cannot exceed the NGROUPS_MAX value, which is defined in <grp.h> . The sysconf function can be used to determine the value of NGROUPS_MAX .

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


RETURN VALUE

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


RELATED FUNCTIONS

getgroups , initgroups


Chapter Contents

Previous

Next

Top of Page

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