Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jul 2002 20:08:19 -0700 (PDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 14923 for review
Message-ID:  <200207260308.g6Q38JS3096307@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=14923

Change 14923 by rwatson@rwatson_curry on 2002/07/25 20:07:42

	Sanity checking on label single/range comparison operations.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#71 edit
.. //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#59 edit

Differences ...

==== //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#71 (text+ko) ====

@@ -196,6 +196,11 @@
 mac_biba_single_in_range(struct mac_biba *single, struct mac_biba *range)
 {
 
+	KASSERT((single->mb_flag & MAC_BIBA_FLAG_SINGLE) != 0,
+	    ("mac_biba_single_in_range: a not single"));
+	KASSERT((range->mb_flag & MAC_BIBA_FLAG_RANGE) != 0,
+	    ("mac_biba_single_in_range: b not range"));
+
 	return (mac_biba_dominate_element(&range->mb_rangehigh,
 	    &single->mb_single) &&
 	    mac_biba_dominate_element(&single->mb_single,

==== //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#59 (text+ko) ====

@@ -181,6 +181,11 @@
 mac_mls_single_in_range(struct mac_mls *single, struct mac_mls *range)
 {
 
+	KASSERT((single->mm_flag & MAC_MLS_FLAG_SINGLE) != 0,
+	    ("mac_mls_single_in_range: a not single"));
+	KASSERT((range->mm_flag & MAC_MLS_FLAG_RANGE) != 0,
+	    ("mac_mls_single_in_range: b not range"));
+
 	return (mac_mls_dominate_element(&range->mm_rangehigh,
 	    &single->mm_single) &&
 	    mac_mls_dominate_element(&single->mm_single,

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207260308.g6Q38JS3096307>