sys_setgroups  [kernel/sys.c]


Sets the supplementary group IDs for the process.

Arguments

eax 81
ebx Size of the buffer pointed by ecx.
ecx Pointer to an array of supplementary group IDs.

Return values

If the system call succeeds the return value is 0.
If the system call fails the return value is one of the following errno values:

-EFAULT ecx has an invalid address.
-EINVAL ebx is greater than NGROUPS_MAX (65536 for Linux 2.6.18).
-EPERM The calling process has insufficient privilege to call sys_setgroups.

Remarks

A process can have up to at least NGROUPS_MAX supplementary group IDs in addition to the effective group ID. The set of supplementary group IDs is inherited from the parent process and may be changed using sys_setgroups. The maximum number of supplementary group IDs can be found using sysconf (man 3 sysconf).

Compatibility

n/a