From owner-p4-projects Sun Jul 21 7:19:10 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3D5D637B400; Sun, 21 Jul 2002 07:19:06 -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 C9A8437B401 for ; Sun, 21 Jul 2002 07:19:05 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C00643E5E for ; Sun, 21 Jul 2002 07:19:05 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6LEJ4JU082325 for ; Sun, 21 Jul 2002 07:19:05 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6LEJ4UB082322 for perforce@freebsd.org; Sun, 21 Jul 2002 07:19:04 -0700 (PDT) Date: Sun, 21 Jul 2002 07:19:04 -0700 (PDT) Message-Id: <200207211419.g6LEJ4UB082322@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 14601 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=14601 Change 14601 by rwatson@rwatson_curry on 2002/07/21 07:18:45 Mediate access to fhopen(). Note the truncation check is still required. Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/vfs_syscalls.c#56 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/vfs_syscalls.c#56 (text+ko) ==== @@ -4467,17 +4467,16 @@ } if (fmode & FREAD) mode |= VREAD; +#ifdef MAC + error = mac_cred_check_open_vnode(td->td_ucred, vp, mode); + if (error) + goto bad; +#endif if (mode) { error = VOP_ACCESS(vp, mode, td->td_ucred, td); if (error) goto bad; } -#ifdef MAC - /* - * XXXMAC: Mediation required here. Also check that the rest of - * this is in sync with vn_open(). - */ -#endif if (fmode & O_TRUNC) { VOP_UNLOCK(vp, 0, td); /* XXX */ if ((error = vn_start_write(NULL, &mp, V_WAIT | PCATCH)) != 0) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message