Invokes the kcred_setpag kernel service and sets the value of PAG type to pag.
int __pag_setvalue (type, pag) int type; int 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.
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.
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. |
__pag_getid System Call, __pag_getname System Call, __pag_getvalue System Call, __pag_setname System Call, kcred_getpagid Kernel Service, kcred_getpagname Kernel Service, and kcred_setpagname Kernel Service.