X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/3e170ce000f1506b7b5d2c5c7faec85ceabb573d..bca245acd4c03fd752d1a45f011ad495e60fe53d:/security/mac_mach_internal.h diff --git a/security/mac_mach_internal.h b/security/mac_mach_internal.h index 79587fd89..df3bae67b 100644 --- a/security/mac_mach_internal.h +++ b/security/mac_mach_internal.h @@ -61,7 +61,10 @@ /* mac_do_machexc() flags */ #define MAC_DOEXCF_TRACED 0x01 /* Only do mach exeception if being ptrace()'ed */ +struct exception_action; struct uthread; +struct task; + int mac_do_machexc(int64_t code, int64_t subcode, uint32_t flags __unused); int mac_schedule_userret(void); @@ -82,6 +85,25 @@ int mac_task_check_set_host_exception_ports(struct task *task, /* threads */ void act_set_astmacf(struct thread *); void mac_thread_userret(struct thread *); + +/* exception actions */ +struct label *mac_exc_create_label(void); +void mac_exc_free_label(struct label *label); + +void mac_exc_associate_action_label(struct exception_action *action, struct label *label); +void mac_exc_free_action_label(struct exception_action *action); + +int mac_exc_update_action_label(struct exception_action *action, struct label *newlabel); +int mac_exc_inherit_action_label(struct exception_action *parent, struct exception_action *child); +int mac_exc_update_task_crash_label(struct task *task, struct label *newlabel); + +int mac_exc_action_check_exception_send(struct task *victim_task, struct exception_action *action); + +void mac_proc_notify_exec_complete(struct proc *proc); + +struct label *mac_exc_create_label_for_proc(struct proc *proc); +struct label *mac_exc_create_label_for_current_proc(void); + #endif /* MAC */ #endif /* !_SECURITY_MAC_MACH_INTERNAL_H_ */