host_security_create_task_token.html   [plain text]


<h2>host_security_create_task_token</h2>
<hr>
<p>
<strong>Function</strong> - Create a new task with an explicit security token.
<h3>SYNOPSIS</h3>
<pre>
<strong>kern_return_t   host_security_create_task_token</strong>
                <strong>(host_security_t</strong>                  <var>host_security</var>,
                 <strong>task_t</strong>                             <var>parent_task</var>,
                 <strong>security_token_t</strong>                <var>security_token</var>,
                 <strong>audit_token_t</strong>                      <var>audit_token</var>,
                 <strong>ledger_port_array_t</strong>                    <var>ledgers</var>,
                 <strong>boolean_t</strong>                       <var>inherit_memory</var>,
                 <strong>task_t</strong>                             <var>child_task</var><strong>);</strong>
</pre>
<h3>PARAMETERS</h3>
<dl>
<p>
<dt><var>host_security</var>
<dd>
[in security send right] The host's security port.
<p>
<dt><var>parent_task</var>
<dd>
[in task send right] The port for the task from which to draw the child 
task's port rights and address space.
<p>
<dt><var>security_token</var>
<dd>
[in scalar] The task's security token.
<p>
<dt><var>audit_token</var>
<dd>
[in scalar] The task's audit token.
<p>
<dt><var>ledgers</var>
<dd>
[pointer to in array of ledger send rights] The set of ledgers from which the
task will draw its resources.
<p>
<dt><var>inherit_memory</var>
<dd>
[in scalar] Address space inheritance indicator. If true, the child task in-
herits the address space of the parent task. If false, the kernel assigns 
the child task an empty address space.
<p>
<dt><var>child_task</var>
<dd>
[out task send right] The kernel-assigned port name for the new task.
</dl>
<h3>DESCRIPTION</h3>
<p>
The <strong><strong>host_security_create_task_token</strong> function creates a new task from
<var>parent_task</var> with explicit security and audit token values, returning the name of the
new task in the parameter specified by <var>child_task</var>. Other than the security and audit token values, the child task
is as if created by <strong>task_create</strong>.
<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="host_security_set_task_token.html"><strong>host_security_set_task_token</strong></a>,
<a href="mach_msg.html"><strong>mach_msg</strong></a>.