diff options
author | rwatson <rwatson@FreeBSD.org> | 2002-10-25 20:45:27 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2002-10-25 20:45:27 +0000 |
commit | 068e73d38906755100544d954fa56b98cd36d4e1 (patch) | |
tree | cb136841289bd522bd94f292fac6599fc185cf57 /sys/kern | |
parent | 1b89bed0f72066b0775b782fdfa47d468945cb05 (diff) | |
download | FreeBSD-src-068e73d38906755100544d954fa56b98cd36d4e1.zip FreeBSD-src-068e73d38906755100544d954fa56b98cd36d4e1.tar.gz |
Comment describing the semantics of mac_late.
Trim trailing whitespace.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_mac.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/kern_mac.c b/sys/kern/kern_mac.c index 29e5157..78bc485 100644 --- a/sys/kern/kern_mac.c +++ b/sys/kern/kern_mac.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); |