From owner-p4-projects Thu Aug 8 14:56:31 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 268AB37B401; Thu, 8 Aug 2002 14:56:26 -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 A978337B400 for ; Thu, 8 Aug 2002 14:56:25 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 649FF43E70 for ; Thu, 8 Aug 2002 14:56:25 -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 g78LuPJU019616 for ; Thu, 8 Aug 2002 14:56:25 -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 g78LuP4C019613 for perforce@freebsd.org; Thu, 8 Aug 2002 14:56:25 -0700 (PDT) Date: Thu, 8 Aug 2002 14:56:25 -0700 (PDT) Message-Id: <200208082156.g78LuP4C019613@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 15700 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=15700 Change 15700 by rwatson@rwatson_paprika on 2002/08/08 14:56:24 In vn_rdwr(), use the saved_cred to authorize calls into VOP_READ() and VOP_WRITE(), except in the case where no saved_cred is provided, in which case we authorize using active_cred. This provides compability with the old behavior by making sure a credential is always available. It should always also be the same credential seen previously. Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/vfs_vnops.c#43 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/vfs_vnops.c#43 (text+ko) ==== @@ -378,6 +378,7 @@ struct uio auio; struct iovec aiov; struct mount *mp; + struct ucred *cred; int error; if ((ioflg & IO_NODELOCKED) == 0) { @@ -414,6 +415,11 @@ } #endif if (error == 0) { + if (saved_cred) + cred = saved_cred; + else + cred = active_cred; + if (rw == UIO_READ) error = VOP_READ(vp, &auio, ioflg, saved_cred); else To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message