summaryrefslogtreecommitdiffstats
path: root/sys/xdr
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2008-11-13 14:36:52 +0000
committerdfr <dfr@FreeBSD.org>2008-11-13 14:36:52 +0000
commit3b3a59e0c74328d30b54d04d9d9e9bb989440e9f (patch)
tree79b8914f161da5a467f67c10ef4013dae5d923dd /sys/xdr
parentf2543b22e03354cdbb01c7978baa01c707d45e1d (diff)
downloadFreeBSD-src-3b3a59e0c74328d30b54d04d9d9e9bb989440e9f.zip
FreeBSD-src-3b3a59e0c74328d30b54d04d9d9e9bb989440e9f.tar.gz
Use the remote address for access control, not the local address. This fixes
the nfsd problems that some people have with the new code. Add support for the vfs.nfsrv.nfs_privport sysctl which denies access unless the client is using a port number less than 1024. Not really sure if this is particularly useful since it doesn't add any real security.
Diffstat (limited to 'sys/xdr')
-rw-r--r--sys/xdr/xdr_mbuf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/xdr/xdr_mbuf.c b/sys/xdr/xdr_mbuf.c
index 8ebd35b..ab79e19 100644
--- a/sys/xdr/xdr_mbuf.c
+++ b/sys/xdr/xdr_mbuf.c
@@ -65,6 +65,7 @@ void
xdrmbuf_create(XDR *xdrs, struct mbuf *m, enum xdr_op op)
{
+ KASSERT(m != NULL, ("xdrmbuf_create with NULL mbuf chain"));
xdrs->x_op = op;
xdrs->x_ops = &xdrmbuf_ops;
xdrs->x_base = (char *) m;
OpenPOWER on IntegriCloud