]> git.saurik.com Git - apple/xnu.git/blob - osfmk/man/host_security_set_task_token.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / host_security_set_task_token.html
1 <h2>host_security_set_task_token</h2>
2 <hr>
3 <p>
4 <strong>Function</strong> - Change the target task's security token.
5 <h3>SYNOPSIS</h3>
6 <pre>
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>
13 </pre>
14 <h3>PARAMETERS</h3>
15 <dl>
16 <p>
17 <dt><var>host_security</var>
18 <dd>
19 [in security send right] The host's security port.
20 <p>
21 <dt><var>task</var>
22 <dd>
23 [in task send right] The port for the task for which the token is to be set.
24 <p>
25 <dt><var>security_token</var>
26 <dd>
27 [in scalar] The new security token.
28 <p>
29 <dt><var>audit_token</var>
30 <dd>
31 [in scalar] The new audit token.
32 <p>
33 <dt><var>host</var>
34 <dd>
35 [in host send right] The task's new host-self port.
36 </dl>
37 <h3>DESCRIPTION</h3>
38 <p>
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
43 parent.
44 <h3>NOTES</h3>
45 <p>
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>
49 <dl>
50 <p>
51 <dt> <strong>KERN_INVALID_SECURITY</strong>
52 <dd>
53 The value of <var>host_security</var> does not specify the security port for the host on which task lies.
54 </dl>
55 <h3>RELATED INFORMATION</h3>
56 <p>
57 Functions:
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>.