usr/src/uts/common/os/priv.c
changeset 11537 8eca52188202
parent 9799 641e52717cb5
child 11569 4fc0a82e09f7
--- a/usr/src/uts/common/os/priv.c	Mon Jan 18 13:03:01 2010 +0530
+++ b/usr/src/uts/common/os/priv.c	Mon Jan 18 11:49:54 2010 +0100
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -88,6 +88,15 @@
 	PRIV_UNSAFE_ASSERT(&priv_unsafe);
 	priv_fillset(&priv_fullset);
 
+	/*
+	 * When booting with priv_debug set, then we'll add an additional
+	 * basic privilege and we verify that it is always present in E.
+	 */
+	if (priv_debug == 1 &&
+	    (priv_basic_test = priv_getbyname("basic_test", PRIV_ALLOC)) >= 0) {
+		priv_addset(priv_basic, priv_basic_test);
+	}
+
 	devpolicy_init();
 }