diff options
author | alc <alc@FreeBSD.org> | 1999-05-03 20:59:14 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 1999-05-03 20:59:14 +0000 |
commit | 7693bdc2450eb74b8f4274bf57d2c5599beb4ef7 (patch) | |
tree | e767a93e7c17c63356adb76540c7149b3dd696fa /sys/nfs | |
parent | 8b7babba5c244886b5f3dcbecaa5c9aff5390c3d (diff) | |
download | FreeBSD-src-7693bdc2450eb74b8f4274bf57d2c5599beb4ef7.zip FreeBSD-src-7693bdc2450eb74b8f4274bf57d2c5599beb4ef7.tar.gz |
All directory accesses must be made with NFS_DIRBLKSIZE chunks to avoid
confusing the directory read cookie cache. The nfs_access implementation
for v2 mounts attempts to read from the directory if root is the user
so that root can't access cached files when the server remaps root
to some other user.
Submitted by: Doug Rabson <dfr@nlsystems.com>
Reviewed by: Matthew Dillon <dillon@apollo.backplane.com>
Diffstat (limited to 'sys/nfs')
-rw-r--r-- | sys/nfs/nfs_vnops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 6114d56..13514b8 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 - * $Id: nfs_vnops.c,v 1.124 1999/03/12 02:24:58 julian Exp $ + * $Id: nfs_vnops.c,v 1.125 1999/05/02 23:56:26 alc Exp $ */ @@ -408,9 +408,9 @@ nfs_access(ap) error = nfs_readrpc(vp, &auio, ap->a_cred); else if (vp->v_type == VDIR) { char* bp; - bp = malloc(DIRBLKSIZ, M_TEMP, M_WAITOK); + bp = malloc(NFS_DIRBLKSIZ, M_TEMP, M_WAITOK); aiov.iov_base = bp; - aiov.iov_len = auio.uio_resid = DIRBLKSIZ; + 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) |