kcred_getpag or kcred_getpag64 Kernel Service
Purpose
Copies a process authentication group (PAG) ID from a credentials structure.
Syntax
#include <sys/cred.h>
int kcred_getpag ( crp, which, pag )
struct ucred * cr;
int which;
int * pag;
int kcred_getpag64 ( crp, which, pag )
struct ucred * cr;
int which;
uint64 * pag;
Parameters
Item | Description |
---|---|
crp | Pointer to a credentials structure |
which | PAG ID to get |
pag | Process authentication group |
Description
The kcred_getpag or kcred_getpag64 kernel service copies the requested PAG from the credentials structure referenced by crp into pag. The value of which must be a defined PAG ID. The PAG ID for the Distributed Computing Environment (DCE) is 0. crp must be a valid, referenced credentials structure.
Execution Environment
The kcred_getpag or kcred_getpag64 kernel service can be called from the process environment only.
Return Values
Upon
successful completion, a value of 0
is returned.
Otherwise, a value of -1
is returned, and the errno global
variable is set to indicate the error.
Error Codes
Thekcred_getpag kernel service fails if the following condition is true:
Item | Description |
---|---|
-EOVERFLOW | PAG value is 64-bit (should be using kcred_getpag64) |