qsygetgroups()--Get Supplemental Group IDs


  Syntax
 #include <qsysetid.h>

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

  Default Public Authority: *USE

  Threadsafe: No

If the gidsetsize argument is zero, qsygetgroups() returns the number of supplemental group IDs associated with the calling thread without modifying the array pointed to by the grouplist argument. Otherwise, qsygetgroups() fills in the array grouplist with the supplementary group IDs of the calling thread and returns the actual number of group IDs stored. The values of array entries with indexes larger than or equal to the returned value are undefined.

Parameters

gidsetsize
(Input) The number of elements in the supplied array grouplist.

grouplist
(Output) The supplementary group IDs.

Authorities

No authorization is required.


Return Value

0 or > 0 qsygetgroups() was successful. If the gidsetsize argument is 0, the number of supplementary group IDs is returned. If gidsetsize is greater than 0, the array grouplist is filled with the supplementary group IDs of the calling thread and the return value represents the actual number of group IDs stored.
-1 qsygetgroups() was not successful. The errno global variable is set to indicate the error.


Error Conditions

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

Error condition Additional information
[EINVAL] The gidsetsize argument is not equal to zero and is less than the number of group IDs.



API introduced: V5R2
Top | UNIX-Type APIs | APIs by category