From owner-freebsd-current Thu Jan 28 01:47:25 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA17733 for freebsd-current-outgoing; Thu, 28 Jan 1999 01:47:25 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from nlsystems.com (nlsys.demon.co.uk [158.152.125.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA17710 for ; Thu, 28 Jan 1999 01:47:17 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from localhost (dfr@localhost) by nlsystems.com (8.9.1/8.8.5) with SMTP id JAA00971; Thu, 28 Jan 1999 09:49:48 GMT Date: Thu, 28 Jan 1999 09:49:48 +0000 (GMT) From: Doug Rabson To: Matthew Dillon cc: current@FreeBSD.ORG Subject: Re: bug in nfs_access() In-Reply-To: <199901280935.BAA02961@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 28 Jan 1999, Matthew Dillon wrote: > : > :On Wed, 27 Jan 1999, Matthew Dillon wrote: > : > :> bug in nfs_access(). nfs/nfs_vnops.c, line 414 or so. > :> > :> Fixed! > :> > :> This is a nasty one. I'm surprised it hasn't caused grief before > : > :I can't see the problem in this code. What was the bug? > > > --- nfs_vnops.c 1999/01/27 22:45:13 1.118 > +++ nfs_vnops.c 1999/01/27 22:45:49 1.119 > @@ -34,7 +34,7 @@ > * SUCH DAMAGE. > * > * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 > - * $Id: nfs_vnops.c,v 1.118 1999/01/27 22:45:13 dillon Exp $ > + * $Id: nfs_vnops.c,v 1.119 1999/01/27 22:45:49 dillon Exp $ > */ > > > @@ -411,7 +411,7 @@ > aiov.iov_len = auio.uio_resid = NFS_DIRBLKSIZ; > error = nfs_readdirrpc(vp, &auio, ap->a_cred); > free(bp, M_TEMP); > - } else if (vp->v_type = VLNK) > + } else if (vp->v_type == VLNK) > error = nfs_readlinkrpc(vp, &auio, ap->a_cred); > else > error = EACCES; > > > I believe the assignment to VLNK is incorrect and that it is supposed > to be a comparison against VLNK instead. You are absolutely correct (I must still be half asleep). I guess that attempts to read from other filetypes didn't reach here or generated calls to the server which returned errors. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message