From owner-p4-projects Wed Oct 23 18:39:26 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CC97037B404; Wed, 23 Oct 2002 18:39:23 -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 7D43B37B401 for ; Wed, 23 Oct 2002 18:39:23 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 380C243E42 for ; Wed, 23 Oct 2002 18:39:23 -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 g9O1cfmV052220 for ; Wed, 23 Oct 2002 18:38:41 -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 g9O1cfwi052216 for perforce@freebsd.org; Wed, 23 Oct 2002 18:38:41 -0700 (PDT) Date: Wed, 23 Oct 2002 18:38:41 -0700 (PDT) Message-Id: <200210240138.g9O1cfwi052216@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 Subject: PERFORCE change 20009 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://perforce.freebsd.org/chv.cgi?CH=20009 Change 20009 by rwatson@rwatson_tislabs on 2002/10/23 18:38:02 Require that target swap devices by high integrity, since they will contain potentially high integrity data. Require Biba privilege to set the swap device. Affected files ... .. //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#156 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#156 (text+ko) ==== @@ -333,6 +333,16 @@ } static int +mac_biba_high_single(struct mac_biba *mac_biba) +{ + + KASSERT((mac_biba->mb_flags & MAC_BIBA_FLAG_SINGLE) != 0, + ("mac_biba_equal_single: mac_biba not single")); + + return (mac_biba->mb_single.mbe_type == MAC_BIBA_TYPE_HIGH); +} + +static int mac_biba_valid(struct mac_biba *mac_biba) { @@ -2455,8 +2465,10 @@ subj = SLOT(&cred->cr_label); obj = SLOT(label); - if (!mac_biba_dominate_single(subj, obj) || - !mac_biba_dominate_single(obj, subj)) + if (!mac_biba_privileged(subj)) + return (EPERM); + + if (!mac_biba_high_single(obj)) return (EACCES); return (0); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message