summaryrefslogtreecommitdiffstats
path: root/sys/security/mac/mac_syscalls.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2003-11-11 03:40:04 +0000
committerrwatson <rwatson@FreeBSD.org>2003-11-11 03:40:04 +0000
commitce4ce483f9706fafb43055c558e71d9d41681157 (patch)
tree36eab838402b7b73550e5d411f7b0fad463143f3 /sys/security/mac/mac_syscalls.c
parent1edb273caa049650a2400e37f4ed0ade9c0a9af8 (diff)
downloadFreeBSD-src-ce4ce483f9706fafb43055c558e71d9d41681157.zip
FreeBSD-src-ce4ce483f9706fafb43055c558e71d9d41681157.tar.gz
Whitespace sync to MAC branch, expand comment at the head of the file.
Diffstat (limited to 'sys/security/mac/mac_syscalls.c')
-rw-r--r--sys/security/mac/mac_syscalls.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/security/mac/mac_syscalls.c b/sys/security/mac/mac_syscalls.c
index 00ce1d9..c459003 100644
--- a/sys/security/mac/mac_syscalls.c
+++ b/sys/security/mac/mac_syscalls.c
@@ -34,9 +34,11 @@
* SUCH DAMAGE.
*/
-/*
- * Framework for extensible kernel access control. Kernel and userland
- * interface to the framework, policy registration and composition.
+/*-
+ * Framework for extensible kernel access control. This file contains
+ * Kernel and userland interface to the framework, policy registration
+ * and composition. Per-object interfaces, controls, and labeling may be
+ * found in src/sys/mac/. Sample policies may be found in src/sys/mac*.
*/
#include <sys/cdefs.h>
@@ -182,6 +184,7 @@ struct mac_policy_list_head mac_static_policy_list;
void
mac_policy_grab_exclusive(void)
{
+
WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL,
"mac_policy_grab_exclusive() at %s:%d", __FILE__, __LINE__);
mtx_lock(&mac_policy_mtx);
@@ -192,6 +195,7 @@ mac_policy_grab_exclusive(void)
void
mac_policy_assert_exclusive(void)
{
+
mtx_assert(&mac_policy_mtx, MA_OWNED);
KASSERT(mac_policy_count == 0,
("mac_policy_assert_exclusive(): not exclusive"));
@@ -210,6 +214,7 @@ mac_policy_release_exclusive(void)
void
mac_policy_list_busy(void)
{
+
mtx_lock(&mac_policy_mtx);
mac_policy_count++;
mtx_unlock(&mac_policy_mtx);
@@ -233,6 +238,7 @@ mac_policy_list_conditional_busy(void)
void
mac_policy_list_unbusy(void)
{
+
mtx_lock(&mac_policy_mtx);
mac_policy_count--;
KASSERT(mac_policy_count >= 0, ("MAC_POLICY_LIST_LOCK"));
OpenPOWER on IntegriCloud