1 <h2>host_security_create_task_token
</h2>
4 <strong>Function
</strong> - Create a new task with an explicit security token.
7 <strong>kern_return_t host_security_create_task_token
</strong>
8 <strong>(host_security_t
</strong> <var>host_security
</var>,
9 <strong>task_t
</strong> <var>parent_task
</var>,
10 <strong>security_token_t
</strong> <var>security_token
</var>,
11 <strong>audit_token_t
</strong> <var>audit_token
</var>,
12 <strong>ledger_port_array_t
</strong> <var>ledgers
</var>,
13 <strong>boolean_t
</strong> <var>inherit_memory
</var>,
14 <strong>task_t
</strong> <var>child_task
</var><strong>);
</strong>
19 <dt><var>host_security
</var>
21 [in security send right] The host's security port.
23 <dt><var>parent_task
</var>
25 [in task send right] The port for the task from which to draw the child
26 task's port rights and address space.
28 <dt><var>security_token
</var>
30 [in scalar] The task's security token.
32 <dt><var>audit_token
</var>
34 [in scalar] The task's audit token.
36 <dt><var>ledgers
</var>
38 [pointer to in array of ledger send rights] The set of ledgers from which the
39 task will draw its resources.
41 <dt><var>inherit_memory
</var>
43 [in scalar] Address space inheritance indicator. If true, the child task in-
44 herits the address space of the parent task. If false, the kernel assigns
45 the child task an empty address space.
47 <dt><var>child_task
</var>
49 [out task send right] The kernel-assigned port name for the new task.
53 The
<strong><strong>host_security_create_task_token
</strong> function creates a new task from
54 <var>parent_task
</var> with explicit security and audit token values, returning the name of the
55 new task in the parameter specified by
<var>child_task
</var>. Other than the security and audit token values, the child task
56 is as if created by
<strong>task_create
</strong>.
59 The host security port is a privileged port given to the system
60 bootstrap task for the use of this call.
61 <h3>RETURN VALUES
</h3>
64 <dt> <strong>KERN_INVALID_SECURITY
</strong>
66 The value of
<var>host_security
</var> does not specify the security port for the host on which task lies.
68 <h3>RELATED INFORMATION
</h3>
71 <a href=
"task_create.html"><strong>task_create
</strong></a>,
72 <a href=
"host_security_set_task_token.html"><strong>host_security_set_task_token
</strong></a>,
73 <a href=
"mach_msg.html"><strong>mach_msg
</strong></a>.