From owner-p4-projects Sun Aug 11 18:41: 1 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 59CA037B401; Sun, 11 Aug 2002 18:40:56 -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 C7A8437B400 for ; Sun, 11 Aug 2002 18:40:55 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 826BB43E3B for ; Sun, 11 Aug 2002 18:40:55 -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 g7C1etJU004500 for ; Sun, 11 Aug 2002 18:40:55 -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 g7C1etBe004497 for perforce@freebsd.org; Sun, 11 Aug 2002 18:40:55 -0700 (PDT) Date: Sun, 11 Aug 2002 18:40:55 -0700 (PDT) Message-Id: <200208120140.g7C1etBe004497@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 15841 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=15841 Change 15841 by rwatson@rwatson_paprika on 2002/08/11 18:40:49 Sync to the version of the MAC checks in -CURRENT: use the thread not process credential (we don't hold appropriate locks for that, and it's inconsistent with other checks), and since it's a short #ifdef, drop the comment on #endif. Affected files ... .. //depot/projects/trustedbsd/mac/sys/compat/svr4/svr4_misc.c#14 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/compat/svr4/svr4_misc.c#14 (text+ko) ==== @@ -314,11 +314,10 @@ } #ifdef MAC - /* Use process's credentials to check directory search MAC. */ - error = mac_check_vnode_readdir(td->td_proc->p_ucred, vp); + error = mac_check_vnode_readdir(td->td_ucred, vp); if (error) goto out; -#endif /* MAC */ +#endif error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, &ncookies, &cookies); @@ -477,11 +476,10 @@ * we massage it into user space, one record at a time. */ #ifdef MAC - /* Use process's credentials to check directory search MAC. */ - error = mac_check_vnode_readdir(td->td_proc->p_ucred, vp); + error = mac_check_vnode_readdir(td->td_ucred, vp); if (error) goto out; -#endif /* MAC */ +#endif error = VOP_READDIR(vp, &auio, fp->f_cred, &eofflag, &ncookies, &cookiebuf); if (error) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message