Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jan 1999 09:49:48 +0000 (GMT)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        current@FreeBSD.ORG
Subject:   Re: bug in nfs_access()
Message-ID:  <Pine.BSF.4.01.9901280948030.95594-100000@herring.nlsystems.com>
In-Reply-To: <199901280935.BAA02961@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.01.9901280948030.95594-100000>