__pag_setvalue System Call

Purpose

Invokes the kcred_setpag kernel service and sets the value of PAG type to pag.

Syntax

int __pag_setvalue (type, pag)
int type;
int pag;

Description

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.

Parameters

Item Description
type An int value indicating the desired PAG.
pag An int value containing the new PAG value.

Return Values

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.

Error Codes

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.