From owner-p4-projects Thu Oct 31 14:36:27 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D489F37B404; Thu, 31 Oct 2002 14:36:23 -0800 (PST) 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 6DB2D37B401 for ; Thu, 31 Oct 2002 14:36:23 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 242A543E6E for ; Thu, 31 Oct 2002 14:36:23 -0800 (PST) (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 g9VMZ1mV024490 for ; Thu, 31 Oct 2002 14:35:01 -0800 (PST) (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 g9VMZ0PB024487 for perforce@freebsd.org; Thu, 31 Oct 2002 14:35:00 -0800 (PST) Date: Thu, 31 Oct 2002 14:35:00 -0800 (PST) Message-Id: <200210312235.g9VMZ0PB024487@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 20496 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=20496 Change 20496 by rwatson@rwatson_tislabs on 2002/10/31 14:34:51 Clarify, and in some cases, correct privilege checks. Affected files ... .. //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#176 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#176 (text+ko) ==== @@ -1877,14 +1877,16 @@ struct label *label) { struct mac_biba *subj, *obj; + int error; if (!mac_biba_enabled) return (0); subj = SLOT(&cred->cr_label); - if (!mac_biba_subject_privileged(subj)) - return (EPERM); + error = mac_biba_subject_privileged(subj); + if (error) + return (error); if (label == NULL) return (0); @@ -1900,14 +1902,16 @@ mac_biba_check_system_settime(struct ucred *cred) { struct mac_biba *subj; + int error; if (!mac_biba_enabled) return (0); subj = SLOT(&cred->cr_label); - if (!mac_biba_subject_privileged(subj)) - return (EPERM); + error = mac_biba_subject_privileged(subj); + if (error) + return (error); return (0); } @@ -1917,6 +1921,7 @@ struct label *label) { struct mac_biba *subj, *obj; + int error; if (!mac_biba_enabled) return (0); @@ -1924,8 +1929,9 @@ subj = SLOT(&cred->cr_label); obj = SLOT(label); - if (!mac_biba_subject_privileged(subj)) - return (EPERM); + error = mac_biba_subject_privileged(subj); + if (error) + return (error); if (!mac_biba_high_single(obj)) return (EACCES); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message