setgroups -- Set Supplementary Group IDs

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.

RETURN VALUE

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

RELATED FUNCTIONS

getgroups, initgroups


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