set_pag or set_pag64 Kernel Service
Purpose
Sets a Process Authentication Group (PAG) value for the current process.
Syntax
#include <sys/cred.h>
int set_pag ( type, pag )
int type;
int pag;
int set_pag64 ( type, pag )
int type;
uint64_t *pag;
Parameters
Item | Description |
---|---|
type | PAG type to change |
pag | PAG value |
Description
The set_pag or set_pag64 kernel service copies the requested PAG for the current process. The caller must synchronize the set_pag and set_pag64 kernel services with validate_pag because set_pag and set_pag64 do not lock process creation across the system. The value of type must be a defined PAG ID. The PAG ID for the Distributed Computing Environment (DCE) is 0.
Execution Environment
The set_pag and set_pag64 kernel services can be called from the process environment only.
Return Values
A
value of 0
is returned upon successful completion.
Upon failure, a -1
is returned and errno is
set to a value that explains the error.
Error Codes
The set_pag and set_pag64 kernel services fails if one or both of the following conditions are true:
Item | Description |
---|---|
EINVAL | Invalid PAG specification |