diff options
author | steve <steve@FreeBSD.org> | 1998-03-28 16:05:05 +0000 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 1998-03-28 16:05:05 +0000 |
commit | 6b391e257211663f018332b6d4af837993b56d13 (patch) | |
tree | 2248a44c42f751bd873e0bf4adbabdd0afaa6b4a /sys | |
parent | c5a445b832c55b38b6fe388c0316d140e655db14 (diff) | |
download | FreeBSD-src-6b391e257211663f018332b6d4af837993b56d13.zip FreeBSD-src-6b391e257211663f018332b6d4af837993b56d13.tar.gz |
Don't allow the readdirplus routine to be used in NFS V2.
PR: 5102
Reviewed by: msmith
Submitted by: Dmitry Kohmanyuk <dk@farm.org>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/nfs/nfs_bio.c | 4 | ||||
-rw-r--r-- | sys/nfsclient/nfs_bio.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c index c1f8bb2..46020e5 100644 --- a/sys/nfs/nfs_bio.c +++ b/sys/nfs/nfs_bio.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95 - * $Id: nfs_bio.c,v 1.52 1998/03/07 21:36:01 dyson Exp $ + * $Id: nfs_bio.c,v 1.53 1998/03/08 09:57:54 julian Exp $ */ @@ -1148,6 +1148,8 @@ nfs_doio(bp, cr, p) case VDIR: nfsstats.readdir_bios++; uiop->uio_offset = ((u_quad_t)bp->b_lblkno) * NFS_DIRBLKSIZ; + if (!(nmp->nm_flag & NFSMNT_NFSV3)) + nmp->nm_flag &= ~NFSMNT_RDIRPLUS; if (nmp->nm_flag & NFSMNT_RDIRPLUS) { error = nfs_readdirplusrpc(vp, uiop, cr); if (error == NFSERR_NOTSUPP) diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c index c1f8bb2..46020e5 100644 --- a/sys/nfsclient/nfs_bio.c +++ b/sys/nfsclient/nfs_bio.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95 - * $Id: nfs_bio.c,v 1.52 1998/03/07 21:36:01 dyson Exp $ + * $Id: nfs_bio.c,v 1.53 1998/03/08 09:57:54 julian Exp $ */ @@ -1148,6 +1148,8 @@ nfs_doio(bp, cr, p) case VDIR: nfsstats.readdir_bios++; uiop->uio_offset = ((u_quad_t)bp->b_lblkno) * NFS_DIRBLKSIZ; + if (!(nmp->nm_flag & NFSMNT_NFSV3)) + nmp->nm_flag &= ~NFSMNT_RDIRPLUS; if (nmp->nm_flag & NFSMNT_RDIRPLUS) { error = nfs_readdirplusrpc(vp, uiop, cr); if (error == NFSERR_NOTSUPP) |