Back to Darwin Xnu

Host Security Create Task Token

osfmk/man/host_security_create_task_token.html

latest1.9 KB
Original Source

host_security_create_task_token


Function - Create a new task with an explicit security token.

SYNOPSIS

**kern\_return\_t host\_security\_create\_task\_token**** (host\_security\_t **host\_security,** task\_t **parent\_task,** security\_token\_t **security\_token,** audit\_token\_t **audit\_token,** ledger\_port\_array\_t **ledgers,** boolean\_t **inherit\_memory,** task\_t **child\_task** );**

PARAMETERS

host_security[in security send right] The host's security port.

parent_task[in task send right] The port for the task from which to draw the child task's port rights and address space.

security_token[in scalar] The task's security token.

audit_token[in scalar] The task's audit token.

ledgers[pointer to in array of ledger send rights] The set of ledgers from which the task will draw its resources.

inherit_memory[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.

child_task[out task send right] The kernel-assigned port name for the new task.

DESCRIPTION

The **host_security_create_task_token function creates a new task from parent_task with explicit security and audit token values, returning the name of the new task in the parameter specified by child_task. Other than the security and audit token values, the child task is as if created by task_create.

NOTES**

The host security port is a privileged port given to the system bootstrap task for the use of this call.

### RETURN VALUES

**KERN_INVALID_SECURITYThe value of host_security does not specify the security port for the host on which task lies.

Functions: task_create, host_security_set_task_token, mach_msg.