From 42b50f5c353a1b82dfef212baf2c4765b4e6fcb2 Mon Sep 17 00:00:00 2001 From: rmacklem Date: Fri, 28 Aug 2015 22:42:37 +0000 Subject: [PATCH] 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. git-svn-id: svn://svn.freebsd.org/base/stable/10@287267 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/fs/nfsserver/nfs_nfsdstate.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index 7f58cd95b..c6d94488d 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 -- 2.45.0