From a67fe518a11b69f1e34c0fe3ca6182c2fe5b6ef7 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Fri, 25 Oct 2002 20:45:27 +0000 Subject: Comment describing the semantics of mac_late. Trim trailing whitespace. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories --- sys/security/mac/mac_process.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/security/mac/mac_process.c') diff --git a/sys/security/mac/mac_process.c b/sys/security/mac/mac_process.c index 29e5157e43b22..78bc485c3863b 100644 --- a/sys/security/mac/mac_process.c +++ b/sys/security/mac/mac_process.c @@ -108,6 +108,11 @@ static unsigned int mac_policy_offsets_free = (1 << MAC_MAX_POLICIES) - 1; SYSCTL_UINT(_security_mac, OID_AUTO, max_policies, CTLFLAG_RD, &mac_max_policies, 0, ""); +/* + * Has the kernel started generating labeled objects yet? All read/write + * access to this variable is serialized during the boot process. Following + * the end of serialization, we don't update this flag; no locking. + */ static int mac_late = 0; static int mac_enforce_fs = 1; @@ -2614,7 +2619,7 @@ mac_check_vnode_swapon(struct ucred *cred, struct vnode *vp) ASSERT_VOP_LOCKED(vp, "mac_check_vnode_swapon"); - if (!mac_enforce_fs) + if (!mac_enforce_fs) return (0); error = vn_refreshlabel(vp, cred); -- cgit v1.3