From owner-p4-projects Fri May 31 18: 5:14 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3703237B407; Fri, 31 May 2002 18:05:06 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 72ADC37B406 for ; Fri, 31 May 2002 18:05:05 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g51155B34947 for perforce@freebsd.org; Fri, 31 May 2002 18:05:05 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Fri, 31 May 2002 18:05:05 -0700 (PDT) Message-Id: <200206010105.g51155B34947@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson Subject: PERFORCE change 12235 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://people.freebsd.org/~peter/p4db/chv.cgi?CH=12235 Change 12235 by rwatson@rwatson_curry on 2002/05/31 18:04:54 Most of the calls to _valid() at the XXX locations in the old MAC code aren't actually needed, since almost all of those instances are called on now-internalized labels generated by mac_internalize() which also does validity checking. Eliminate many redundant label checks. Affected files ... ... //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#40 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#40 (text+ko) ==== @@ -1080,10 +1080,6 @@ new = SLOT(newlabel); - error = mac_biba_valid(new); - if (error) - return (error); - if ((new->mb_flags & MAC_BIBA_FLAGS_BOTH) != MAC_BIBA_FLAGS_BOTH) return (EINVAL); @@ -1099,10 +1095,6 @@ new = SLOT(newlabel); - error = mac_biba_valid(new); - if (error) - return (error); - if ((new->mb_flags & MAC_BIBA_FLAGS_BOTH) != MAC_BIBA_FLAG_SINGLE) return (EINVAL); @@ -1119,10 +1111,6 @@ new = SLOT(newlabel); - error = mac_biba_valid(new); - if (error) - return (error); - if ((new->mb_flags & MAC_BIBA_FLAGS_BOTH) != MAC_BIBA_FLAGS_BOTH) return (EINVAL); @@ -1145,10 +1133,6 @@ new = SLOT(newlabel); subj = SLOT(&cred->cr_label); - error = mac_biba_valid(new); - if (error) - return (error); - if ((new->mb_flags & MAC_BIBA_FLAGS_BOTH) != MAC_BIBA_FLAG_SINGLE) return (EINVAL); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message