Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Aug 2003 10:53:06 -0700 (PDT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 36609 for review
Message-ID:  <200308211753.h7LHr6Hx011926@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=36609

Change 36609 by rwatson@rwatson_tislabs on 2003/08/21 10:53:03

	Slightly clean up logic for relabel checking: if a label contains
	at least one of the two flags, that doesn't imply that at least
	one of the flags isn't set.  Instead of always overwriting one
	of the fields in the new label, only overwrite them if they're
	not defined on the new version of the label yet.

Affected files ...

.. //depot/projects/trustedbsd/mac/sys/security/mac_lomac/mac_lomac.c#64 edit

Differences ...

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

@@ -1613,7 +1613,7 @@
 		 */
 		if ((new->ml_flags & MAC_LOMAC_FLAG_SINGLE) == 0)
 			mac_lomac_copy_single(subj, new);
-		else
+		if ((new->ml_flags & MAC_LOMAC_FLAG_RANGE) == 0)
 			mac_lomac_copy_range(subj, new);
 			
 		/*
@@ -1705,7 +1705,7 @@
 		 */
 		if ((new->ml_flags & MAC_LOMAC_FLAG_SINGLE) == 0)
 			mac_lomac_copy_single(subj, new);
-		else
+		if ((new->ml_flags & MAC_LOMAC_FLAG_RANGE) == 0)
 			mac_lomac_copy_range(subj, new);
 
 		/*



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