qsysetgroups()--Set Supplemental Group IDs


  Syntax
 #include <qsysetid.h>

 int qsysetgroups(int gidsetsize, gid_t grouplist[])   
  Service Program Name: QSYSETIDS

  Default Public Authority: *USE

  Threadsafe: No

The qsysetgroups API sets the supplementary group IDs of the calling thread. The qsysetgroups API cannot set more than (NGROUPS_MAX-1) groups in the group set.

The real group ID, effective group ID and saved group ID remain unchanged.

Job scoped locks with a lock state of *SHRRD are held on the user profiles associated with the real user ID, effective user ID, saved user ID, real group ID, effective group ID, saved group ID, and all of the supplemental groups.


Parameters

gidsetsize
(Input) The number of elements in the supplied array grouplist. If the number of elements is specified as 0, the current supplementary groups will be removed.

grouplist
(Input) The supplementary group IDs.

Authorities and locks

User profile associated with gid Authority
*USE authority is required to the user profile associated with each gid in the group list if the gid is not equal to the current thread's real, effective, or saved group IDs or one of the groups in the current thread's supplemental group list.

User profile associated with each gid Lock
*SHRRD

Return Value



Error Conditions

If qsysetgroups() is not successful, errno usually indicates one of the following errors. Under some conditions, errno could indicate an error other than those listed here.




API introduced: V5R2

[ Back to top | UNIX-Type APIs | APIs by category ]