Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jan 1999 01:35:43 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Doug Rabson <dfr@nlsystems.com>
Cc:        current@FreeBSD.ORG
Subject:   Re: bug in nfs_access()
Message-ID:  <199901280935.BAA02961@apollo.backplane.com>
References:   <Pine.BSF.4.01.9901280935030.95594-100000@herring.nlsystems.com>

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

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>

:--
: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
:


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?199901280935.BAA02961>