1 <h2>host_security_set_task_token
</h2>
4 <strong>Function
</strong> - Change the target task's security token.
7 <strong>kern_return_t host_security_set_task_token
</strong>
8 <strong>(host_security_t
</strong> <var>host_security
</var>,
9 <strong>task_t
</strong> <var>task
</var>,
10 <strong>security_token_t
</strong> <var>security_token
</var>,
11 <strong>audit_token_t
</strong> <var>audit_token
</var>,
12 <strong>host_t
</strong> <var>host
</var><strong>);
</strong>
17 <dt><var>host_security
</var>
19 [in security send right] The host's security port.
23 [in task send right] The port for the task for which the token is to be set.
25 <dt><var>security_token
</var>
27 [in scalar] The new security token.
29 <dt><var>audit_token
</var>
31 [in scalar] The new audit token.
35 [in host send right] The task's new host-self port.
39 The
<strong>host_security_set_task_token
</strong> function changes the
40 specified task's security and audit tokens; the new tokens will be
41 included in all subsequent messages sent from the task. The
42 initial value of a task's security and audit tokens is that of its
46 The host security port is a privileged port given to the system
47 bootstrap task for the use of this call.
48 <h3>RETURN VALUES
</h3>
51 <dt> <strong>KERN_INVALID_SECURITY
</strong>
53 The value of
<var>host_security
</var> does not specify the security port for the host on which task lies.
55 <h3>RELATED INFORMATION
</h3>
58 <a href=
"task_create.html"><strong>task_create
</strong></a>,
59 <a href=
"task_info.html"><strong>task_info
</strong></a>,
60 <a href=
"mach_msg.html"><strong>mach_msg
</strong></a>.