Copies the concurrent group set from a credentials structure.
#include <sys/cred.h>
| Item | Description |
|---|---|
| crp | Pointer to a credentials structure |
| ngroups | Size of the array of group ID values |
| groups | Array of group ID values |
The kcred_getgroups kernel service returns up to ngroups concurrent group set members from the credentials structure pointed to by crp. crp must be a valid referenced credentials structure.
The kcred_getgroups kernel service can be called from the process environment only.
| Item | Description |
|---|---|
| >= 0 | The number of concurrent groups copied to groups. |
| -1 | An error has occurred. |