#include <sys/queue.h>
#include <security/mac_internal.h>
#include <bsd/bsm/audit.h>
-#include <bsd/bsm/audit_kernel.h>
+#include <bsd/security/audit/audit.h>
#include <bsd/sys/malloc.h>
#include <vm/vm_kern.h>
#include <kern/kalloc.h>
#include <kern/zalloc.h>
-#if AUDIT
+#if CONFIG_AUDIT
/* The zone allocator is initialized in mac_base.c. */
zone_t mac_audit_data_zone;
}
int
-mac_proc_check_setaudit(struct proc *curp, struct auditinfo *ai)
+mac_proc_check_setaudit(struct proc *curp, struct auditinfo_addr *ai)
{
kauth_cred_t cred;
int error;
return (ret);
}
-#else /* AUDIT */
+#else /* !CONFIG_AUDIT */
/*
* Function stubs for when AUDIT isn't defined.
*/
int
-mac_system_check_audit(struct ucred *cred, void *record, int length)
+mac_system_check_audit(__unused struct ucred *cred, __unused void *record, __unused int length)
{
return (0);
}
int
-mac_system_check_auditon(struct ucred *cred, int cmd)
+mac_system_check_auditon(__unused struct ucred *cred, __unused int cmd)
{
return (0);
}
int
-mac_system_check_auditctl(struct ucred *cred, struct vnode *vp)
+mac_system_check_auditctl(__unused struct ucred *cred, __unused struct vnode *vp)
{
return (0);
}
int
-mac_proc_check_setaudit(__unused struct proc *curp, struct auditinfo *ai)
+mac_proc_check_setaudit(__unused struct proc *curp,
+ __unused struct auditinfo_addr *ai)
{
return (0);
return (MAC_AUDIT_DEFAULT);
}
-int
-mac_audit(int len, u_char *data)
-{
-
- return (0);
-}
-
int
mac_audit_text(__unused char *text, __unused mac_policy_handle_t handle)
{
return (0);
}
-#endif /* !AUDIT */
+#endif /* !CONFIG_AUDIT */