]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/task_set_security_token.html
xnu-344.49.tar.gz
[apple/xnu.git] / osfmk / man / task_set_security_token.html
1 <h2>task_set_security_token</h2> <hr> <p> <strong>Function</strong> - Change the target task's security token. <h3>SYNOPSIS</h3> <pre> <strong>kern_return_t task_set_security_token</strong> <strong>(task_t</strong> <var>task</var>, <strong>security_port_t</strong> <var>host_security</var>, <strong>security_token_t</strong> <var>security_token</var><strong>);</strong> </pre> <h3>PARAMETERS</h3> <dl> <p> <dt><var>task</var> <dd> [in task send right] The port for the task for which the token is to be set. <p> <dt><var>host_security</var> <dd> [in security send right] The host's security port. <p> <dt><var>security_token</var> <dd> [in scalar] The new security token. </dl> <h3>DESCRIPTION</h3> <p> The <strong>task_set_security_token</strong> function changes the specified task's security token; the new token will be included in all subsequent messages sent from the task. The initial value of a task's security token is that of its parent. <h3>NOTES</h3> <p> The host security port is a privileged port given to the system bootstrap task for the use of this call. <h3>RETURN VALUES</h3> <dl> <p> <dt> <strong>KERN_INVALID_SECURITY</strong> <dd> The value of <var>host_security</var> does not specify the security port for the host on which task lies. </dl> <h3>RELATED INFORMATION</h3> <p> Functions: <a href="task_create.html"><strong>task_create</strong></a>, <a href="task_info.html"><strong>task_info</strong></a>, <a href="mach_msg.html"><strong>mach_msg</strong></a>.