#include <kern/host.h>
#include <kern/kalloc.h>
#include <kern/zalloc.h>
-#include <kern/lock.h>
-#include <kern/wait_queue.h>
#include <kern/sched_prim.h>
#if CONFIG_MACF
getaudit_addr(proc_t p, struct getaudit_addr_args *uap,
__unused int32_t *retval)
{
+#if CONFIG_MACF
+ int error = mac_proc_check_getaudit(p);
+ if (error)
+ return (error);
+#endif /* CONFIG_MACF */
WARN_IF_AINFO_ADDR_CHANGED(uap->length, sizeof(auditinfo_addr_t),
"getaudit_addr(2)", "auditinfo_addr_t");