Invokes the kcred_setpag kernel service and sets the value of PAG type to pag.
Given a PAG type and value, the __pag_setvalue system call invokes the kcred_setpag kernel service and sets the value of PAG type to pag. This system call requires the SET_PROC_DAC privilege.
| Item | Description |
|---|---|
| type | An int value indicating the desired PAG. |
| pag | An int value containing the new PAG value. |
If successful, 0 is returned. If unsuccessful, -1 is returned and the errno global variable is set to a value reflecting the cause of the error.
| Item | Description |
|---|---|
| ENOENT | The type parameter doesn't reference an existing PAG type. |
| EINVAL | The value of pag is -1. |
| EPERM | The calling process lacks the appropriate privilege. |