Back to Darwin Xnu

Host Security Set Task Token

osfmk/man/host_security_set_task_token.html

latest1.3 KB
Original Source

host_security_set_task_token


Function - Change the target task's security token.

SYNOPSIS

**kern\_return\_t host\_security\_set\_task\_token**** (host\_security\_t **host\_security,** task\_t **task,** security\_token\_t **security\_token,** audit\_token\_t **audit\_token,** host\_t **host** );**

PARAMETERS

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

task[in task send right] The port for the task for which the token is to be set.

security_token[in scalar] The new security token.

audit_token[in scalar] The new audit token.

host[in host send right] The task's new host-self port.

DESCRIPTION

The host_security_set_task_token function changes the specified task's security and audit tokens; the new tokens will be included in all subsequent messages sent from the task. The initial value of a task's security and audit tokens is that of its parent.

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_SECURITY The value of host_security does not specify the security port for the host on which task lies.

Functions: task_create, task_info, mach_msg.