Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/setgroups.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/setgroups.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/setgroups.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/setgroups.html on line 8

setgroups()

Set supplementary group IDs

Synopsis:

#include <unistd.h>

int setgroups( int ngroups,
               const gid_t *gidset );

Arguments:

ngroups
The number of entries in the gidset array.
gidset
An array of the supplementary group IDs that you want to assign to the current user. This number of entries in this array can't exceed NGROUPS_MAX.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The setgroups() function sets the group access list of the current user to the array of group IDs in gidset.


Note: Only root can set new groups.

Returns:

0, or -1 if an error occurred (errno is set).

Errors:

EFAULT
The gidset argument isn't a valid pointer.
EPERM
The caller isn't root.

Classification:

Unix

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler No
Thread No

See also:

getgroups(), initgroups()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/s/setgroups.html on line 140

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/s/setgroups.html on line 140