From owner-p4-projects@FreeBSD.ORG Thu Aug 21 10:53:09 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9378316A4FA; Thu, 21 Aug 2003 10:53:08 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 38BC516A4E2 for ; Thu, 21 Aug 2003 10:53:08 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0E9943F93 for ; Thu, 21 Aug 2003 10:53:07 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h7LHr70U011929 for ; Thu, 21 Aug 2003 10:53:07 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h7LHr6Hx011926 for perforce@freebsd.org; Thu, 21 Aug 2003 10:53:06 -0700 (PDT) Date: Thu, 21 Aug 2003 10:53:06 -0700 (PDT) Message-Id: <200308211753.h7LHr6Hx011926@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 36609 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Aug 2003 17:53:09 -0000 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); /*