PERFORCE change 14923 for review

Robert Watson rwatson at freebsd.org
Fri Jul 26 03:08:19 GMT 2002


http://people.freebsd.org/~peter/p4db/chv.cgi?CH=14923

Change 14923 by rwatson at 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 at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message



More information about the trustedbsd-cvs mailing list