diff options
author | peter <peter@FreeBSD.org> | 1999-06-05 05:35:03 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-06-05 05:35:03 +0000 |
commit | 21732dea0c4943518e727150906d9117775a8a6b (patch) | |
tree | 99f7e98fb0f17e44493e65e48edc712f1686eb56 /sys/nfs/nfs_vnops.c | |
parent | 06a6a667a6bf7a90688c9b4f6a3bac0a4f01a1c6 (diff) | |
download | FreeBSD-src-21732dea0c4943518e727150906d9117775a8a6b.zip FreeBSD-src-21732dea0c4943518e727150906d9117775a8a6b.tar.gz |
Various changes lifted from the OpenBSD cvs tree:
txdr_hyper and fxdr_hyper tweaks to avoid excessive CPU order knowledge.
nfs_serv.c: don't call nfsm_adj() with negative values, windows clients
could crash servers when doing a readdir of a large directory.
nfs_socket.c: Use IP_PORTRANGE to get a priviliged port without a spin
loop trying to bind(). Don't clobber a mbuf pointer or we get panics
on a NFS3ERR_JUKEBOX error from a server when reusing a freed mbuf.
nfs_subs.c: Don't loose st_blocks on NFSv2 mounts when > 2GB.
Obtained from: OpenBSD
Diffstat (limited to 'sys/nfs/nfs_vnops.c')
-rw-r--r-- | sys/nfs/nfs_vnops.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 1737554..1450102 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.128 1999/05/06 20:00:30 phk Exp $ + * $Id: nfs_vnops.c,v 1.129 1999/05/11 19:54:47 phk Exp $ */ @@ -1048,7 +1048,7 @@ nfs_readrpc(vp, uiop, cred) nfsm_fhtom(vp, v3); nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED * 3); if (v3) { - txdr_hyper(&uiop->uio_offset, tl); + txdr_hyper(uiop->uio_offset, tl); *(tl + 2) = txdr_unsigned(len); } else { *tl++ = txdr_unsigned(uiop->uio_offset); @@ -1115,7 +1115,7 @@ nfs_writerpc(vp, uiop, cred, iomode, must_commit) nfsm_fhtom(vp, v3); if (v3) { nfsm_build(tl, u_int32_t *, 5 * NFSX_UNSIGNED); - txdr_hyper(&uiop->uio_offset, tl); + txdr_hyper(uiop->uio_offset, tl); tl += 2; *tl++ = txdr_unsigned(len); *tl++ = txdr_unsigned(*iomode); @@ -2075,7 +2075,7 @@ nfs_readdirrpc(vp, uiop, cred) if (v3) { nfsm_dissect(tl, u_int32_t *, 3 * NFSX_UNSIGNED); - fxdr_hyper(tl, &fileno); + fileno = fxdr_hyper(tl); len = fxdr_unsigned(int, *(tl + 2)); } else { nfsm_dissect(tl, u_int32_t *, @@ -2258,7 +2258,7 @@ nfs_readdirplusrpc(vp, uiop, cred) /* loop thru the dir entries, doctoring them to 4bsd form */ while (more_dirs && bigenough) { nfsm_dissect(tl, u_int32_t *, 3 * NFSX_UNSIGNED); - fxdr_hyper(tl, &fileno); + fileno = fxdr_hyper(tl); len = fxdr_unsigned(int, *(tl + 2)); if (len <= 0 || len > NFS_MAXNAMLEN) { error = EBADRPC; @@ -2580,7 +2580,7 @@ nfs_commit(vp, offset, cnt, cred, procp) nfsm_reqhead(vp, NFSPROC_COMMIT, NFSX_FH(1)); nfsm_fhtom(vp, 1); nfsm_build(tl, u_int32_t *, 3 * NFSX_UNSIGNED); - txdr_hyper(&offset, tl); + txdr_hyper(offset, tl); tl += 2; *tl = txdr_unsigned(cnt); nfsm_request(vp, NFSPROC_COMMIT, procp, cred); |