usr/src/uts/common/c2/audit_start.c
changeset 1676 37f4a3e2bd99
parent 0 68f95e015346
child 2425 9274196fea31
--- a/usr/src/uts/common/c2/audit_start.c	Thu Mar 23 19:49:27 2006 -0800
+++ b/usr/src/uts/common/c2/audit_start.c	Fri Mar 24 12:29:20 2006 -0800
@@ -2,9 +2,8 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
  *
  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  * or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -44,6 +43,7 @@
 #include <sys/debug.h>
 #include <sys/cred_impl.h>
 #include <sys/zone.h>
+#include <sys/tsol/label.h>
 #include <c2/audit.h>
 #include <c2/audit_kernel.h>
 #include <c2/audit_kevents.h>
@@ -428,6 +428,10 @@
 			/* Add an optional group token */
 			AUDIT_SETGROUP(&(u_ad), cr, kctx);
 
+			/* Add token for process SL */
+			if (is_system_labeled())
+				au_write(&(u_ad), au_to_label(CR_SL(cr)));
+
 			if (tad->tad_evmod & PAD_SPRIVUSE)
 				au_write(&(u_ad),
 					au_to_privset("", &tad->tad_sprivs,