Index: security/audit/audit_syscalls.c
===================================================================
RCS file: /zoo/cvsup/FreeBSD-CVS/src/sys/security/audit/audit_syscalls.c,v
retrieving revision 1.19
diff -u -r1.19 audit_syscalls.c
--- security/audit/audit_syscalls.c	15 Jun 2007 15:20:56 -0000	1.19
+++ security/audit/audit_syscalls.c	16 Jun 2007 22:59:48 -0000
@@ -591,7 +591,7 @@
 	oldcred = td->td_proc->p_ucred;
 	crcopy(newcred, oldcred);
 #ifdef MAC
-	error = mac_check_proc_setaudit(oldcred, NULL);
+	error = mac_check_proc_setaudit_addr(oldcred, &aia);
 	if (error)
 		goto fail;
 #endif
Index: security/mac/mac_audit.c
===================================================================
RCS file: /zoo/cvsup/FreeBSD-CVS/src/sys/security/mac/mac_audit.c,v
retrieving revision 1.1
diff -u -r1.1 mac_audit.c
--- security/mac/mac_audit.c	21 Apr 2007 22:08:47 -0000	1.1
+++ security/mac/mac_audit.c	14 Jun 2007 06:06:15 -0000
@@ -56,6 +56,16 @@
 }
 
 int
+mac_check_proc_setaudit_addr(struct ucred *cred, struct auditinfo_addr *aia)
+{
+	int error;
+
+	MAC_CHECK(check_proc_setaudit_addr, cred, aia);
+
+	return (error);
+}
+
+int
 mac_check_proc_setauid(struct ucred *cred, uid_t auid)
 {
 	int error;
Index: security/mac/mac_framework.h
===================================================================
RCS file: /zoo/cvsup/FreeBSD-CVS/src/sys/security/mac/mac_framework.h,v
retrieving revision 1.82
diff -u -r1.82 mac_framework.h
--- security/mac/mac_framework.h	23 Apr 2007 13:36:53 -0000	1.82
+++ security/mac/mac_framework.h	14 Jun 2007 06:05:01 -0000
@@ -297,6 +297,8 @@
 int	mac_check_proc_debug(struct ucred *cred, struct proc *p);
 int	mac_check_proc_sched(struct ucred *cred, struct proc *p);
 int	mac_check_proc_setaudit(struct ucred *cred, struct auditinfo *ai);
+int	mac_check_proc_setaudit_addr(struct ucred *cred,
+	    struct auditinfo_addr *aia);
 int	mac_check_proc_setauid(struct ucred *cred, uid_t auid);
 int	mac_check_proc_setuid(struct proc *p,  struct ucred *cred,
 	    uid_t uid);
Index: security/mac/mac_policy.h
===================================================================
RCS file: /zoo/cvsup/FreeBSD-CVS/src/sys/security/mac/mac_policy.h,v
retrieving revision 1.91
diff -u -r1.91 mac_policy.h
--- security/mac/mac_policy.h	23 Apr 2007 13:36:53 -0000	1.91
+++ security/mac/mac_policy.h	14 Jun 2007 06:06:43 -0000
@@ -450,6 +450,8 @@
 		    struct proc *p);
 typedef int	(*mpo_check_proc_setaudit_t)(struct ucred *cred,
 		    struct auditinfo *ai);
+typedef int	(*mpo_check_proc_setaudit_addr_t)(struct ucred *cred,
+		    struct auditinfo_addr *aia);
 typedef int	(*mpo_check_proc_setauid_t)(struct ucred *cred, uid_t auid);
 typedef int	(*mpo_check_proc_setuid_t)(struct ucred *cred, uid_t uid);
 typedef int	(*mpo_check_proc_seteuid_t)(struct ucred *cred, uid_t euid);
@@ -826,6 +828,7 @@
 	mpo_check_proc_debug_t			mpo_check_proc_debug;
 	mpo_check_proc_sched_t			mpo_check_proc_sched;
 	mpo_check_proc_setaudit_t		mpo_check_proc_setaudit;
+	mpo_check_proc_setaudit_addr_t		mpo_check_proc_setaudit_addr;
 	mpo_check_proc_setauid_t		mpo_check_proc_setauid;
 	mpo_check_proc_setuid_t			mpo_check_proc_setuid;
 	mpo_check_proc_seteuid_t		mpo_check_proc_seteuid;
Index: security/mac_stub/mac_stub.c
===================================================================
RCS file: /zoo/cvsup/FreeBSD-CVS/src/sys/security/mac_stub/mac_stub.c,v
retrieving revision 1.66
diff -u -r1.66 mac_stub.c
--- security/mac_stub/mac_stub.c	23 Apr 2007 13:36:53 -0000	1.66
+++ security/mac_stub/mac_stub.c	14 Jun 2007 15:07:29 -0000
@@ -916,6 +916,13 @@
 }
 
 static int
+stub_check_proc_setaudit_addr(struct ucred *cred, struct auditinfo_addr *aia)
+{
+
+	return (0);
+}
+
+static int
 stub_check_proc_setauid(struct ucred *cred, uid_t auid)
 {
 
@@ -1579,6 +1586,7 @@
 	.mpo_check_proc_debug = stub_check_proc_debug,
 	.mpo_check_proc_sched = stub_check_proc_sched,
 	.mpo_check_proc_setaudit = stub_check_proc_setaudit,
+	.mpo_check_proc_setaudit_addr = stub_check_proc_setaudit_addr,
 	.mpo_check_proc_setauid = stub_check_proc_setauid,
 	.mpo_check_proc_setuid = stub_check_proc_setuid,
 	.mpo_check_proc_seteuid = stub_check_proc_seteuid,
Index: security/mac_test/mac_test.c
===================================================================
RCS file: /zoo/cvsup/FreeBSD-CVS/src/sys/security/mac_test/mac_test.c,v
retrieving revision 1.76
diff -u -r1.76 mac_test.c
--- security/mac_test/mac_test.c	23 Apr 2007 13:36:54 -0000	1.76
+++ security/mac_test/mac_test.c	14 Jun 2007 06:09:05 -0000
@@ -1668,6 +1668,18 @@
 	return (0);
 }
 
+COUNTER_DECL(check_proc_setaudit_addr);
+static int
+mac_test_check_proc_setaudit_addr(struct ucred *cred,
+    struct auditinfo_addr *aia)
+{
+
+	LABEL_CHECK(cred->cr_label, MAGIC_CRED);
+	COUNTER_INC(check_proc_setaudit_addr);
+
+	return (0);
+}
+
 COUNTER_DECL(check_proc_setauid);
 static int
 mac_test_check_proc_setauid(struct ucred *cred, uid_t auid)
@@ -2608,6 +2620,7 @@
 	.mpo_check_proc_debug = mac_test_check_proc_debug,
 	.mpo_check_proc_sched = mac_test_check_proc_sched,
 	.mpo_check_proc_setaudit = mac_test_check_proc_setaudit,
+	.mpo_check_proc_setaudit_addr = mac_test_check_proc_setaudit_addr,
 	.mpo_check_proc_setauid = mac_test_check_proc_setauid,
 	.mpo_check_proc_setuid = mac_test_check_proc_setuid,
 	.mpo_check_proc_seteuid = mac_test_check_proc_seteuid,
