summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2015-08-28 22:42:37 +0000
committerrmacklem <rmacklem@FreeBSD.org>2015-08-28 22:42:37 +0000
commitb90ab2596fccb7f1eb0655e5a0f8450c61b7f331 (patch)
tree1be4997fb144858286567cc1c8058498b0dce8e9 /sys
parent461d06c693c3223ca34cea5045561db8eab04880 (diff)
downloadFreeBSD-src-b90ab2596fccb7f1eb0655e5a0f8450c61b7f331.zip
FreeBSD-src-b90ab2596fccb7f1eb0655e5a0f8450c61b7f331.tar.gz
MFC: r286790
For the case where an NFSv4.1 ExchangeID operation has the client identifier that already has a confirmed ClientID, the nfsrv_setclient() function would not fill in the clientidp being returned. As such, the value of ClientID returned would be whatever garbage was on the stack. This patch fixes the problem by filling in these fields.
Diffstat (limited to 'sys')
-rw-r--r--sys/fs/nfsserver/nfs_nfsdstate.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c
index 7f58cd9..c6d9448 100644
--- a/sys/fs/nfsserver/nfs_nfsdstate.c
+++ b/sys/fs/nfsserver/nfs_nfsdstate.c
@@ -406,9 +406,12 @@ nfsrv_setclient(struct nfsrv_descript *nd, struct nfsclient **new_clpp,
}
/* For NFSv4.1, mark that we found a confirmed clientid. */
- if ((nd->nd_flag & ND_NFSV41) != 0)
+ if ((nd->nd_flag & ND_NFSV41) != 0) {
+ clientidp->lval[0] = clp->lc_clientid.lval[0];
+ clientidp->lval[1] = clp->lc_clientid.lval[1];
+ confirmp->lval[0] = 0; /* Ignored by client */
confirmp->lval[1] = 1;
- else {
+ } else {
/*
* id and verifier match, so update the net address info
* and get rid of any existing callback authentication
OpenPOWER on IntegriCloud