From owner-p4-projects Tue Jun 4 8:48: 7 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1D2C737B403; Tue, 4 Jun 2002 08:48:01 -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 596AD37B401 for ; Tue, 4 Jun 2002 08:48:00 -0700 (PDT) Received: (from perforce@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g54Fm0443612 for perforce@freebsd.org; Tue, 4 Jun 2002 08:48:00 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 4 Jun 2002 08:48:00 -0700 (PDT) Message-Id: <200206041548.g54Fm0443612@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 12360 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=12360 Change 12360 by rwatson@rwatson_curry on 2002/06/04 08:47:52 In mac_{biba,mls}_cred_check_rename_to_vnode(), don't dereference the target vnode label unless the vnode is non-NULL. This covers the "are you allowed to overwrite file (x) in a rename", which only applies if there is a target file to overwrite. Affected files ... ... //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#46 edit ... //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#33 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/security/mac_biba/mac_biba.c#46 (text+ko) ==== @@ -1406,10 +1406,12 @@ if (!mac_biba_dominate_single(subj, obj)) return (EACCES); - obj = SLOT(label); + if (vp != NULL) { + obj = SLOT(label); - if (!mac_biba_dominate_single(subj, obj)) - return (EACCES); + if (!mac_biba_dominate_single(subj, obj)) + return (EACCES); + } return (0); } ==== //depot/projects/trustedbsd/mac/sys/security/mac_mls/mac_mls.c#33 (text+ko) ==== @@ -1399,10 +1399,12 @@ if (!mac_mls_dominate_single(obj, subj)) return (EACCES); - obj = SLOT(label); + if (vp != NULL) { + obj = SLOT(label); - if (!mac_mls_dominate_single(obj, subj)) - return (EACCES); + if (!mac_mls_dominate_single(obj, subj)) + return (EACCES); + } return (0); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message