#include <mach/host_security.h> also included by <mach/mach.h>

mach/host_security.h

3 macros · 2 functions

macro_host_security_user_

#define _host_security_user_ 

macrohost_security_MSG_COUNT

#define host_security_MSG_COUNT 2

functionhost_security_create_task_token

extern kern_return_t host_security_create_task_token(
	host_security_t host_security,
	task_t parent_task,
	security_token_t sec_token,
	audit_token_t audit_token,
	host_t host,
	ledger_array_t ledgers,
	mach_msg_type_number_t ledgersCnt,
	boolean_t inherit_memory,
	task_t *child_task /* out */
)
Basic types Obsolete interfaces, removed from kernel.
MIG routine from mach/host_security.defs

functionhost_security_set_task_token

extern kern_return_t host_security_set_task_token(
	host_security_t host_security,
	task_t target_task,
	security_token_t sec_token,
	audit_token_t audit_token,
	host_t host
)
MIG routine from mach/host_security.defs
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/mach/host_security.defs
Obsolete; removed from the kernel (host_security.defs lists it under "Obsolete interfaces, removed from kernel"). Formerly, given the host security port, it set the target task's security token and audit token, the kernel-maintained credentials reported to receivers of messages from the task. The call now fails with MIG_BAD_ID.

macrosubsystem_to_name_map_host_security

#define subsystem_to_name_map_host_security { "host_security_create_task_token", 600 },
    { "host_security_set_task_token", 601 }