Author: rmacklem
Date: Fri Aug 28 22:42:37 2015
New Revision: 287267
URL: https://svnweb.freebsd.org/changeset/base/287267

Log:
  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.

Modified:
  stable/10/sys/fs/nfsserver/nfs_nfsdstate.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/nfsserver/nfs_nfsdstate.c
==============================================================================
--- stable/10/sys/fs/nfsserver/nfs_nfsdstate.c  Fri Aug 28 20:53:08 2015        
(r287266)
+++ stable/10/sys/fs/nfsserver/nfs_nfsdstate.c  Fri Aug 28 22:42:37 2015        
(r287267)
@@ -406,9 +406,12 @@ nfsrv_setclient(struct nfsrv_descript *n
        }
 
        /* 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
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to