mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-27 08:00:11 +00:00
Fixed the Null callback RPCs so that they work with the new krpc. This
required two changes: setting the program and version numbers before connect and fixing the handling of the Null Rpc case in newnfs_request(). Approved by: kib (mentor)
This commit is contained in:
parent
433e2f4763
commit
15e8331f0e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=192181
@ -456,7 +456,9 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
|
||||
if (nrp->nr_client == NULL)
|
||||
newnfs_connect(nmp, nrp, cred, td, 0);
|
||||
|
||||
if (usegssname)
|
||||
if (nd->nd_procnum == NFSPROC_NULL)
|
||||
auth = authnone_create();
|
||||
else if (usegssname)
|
||||
auth = nfs_getauth(nrp, secflavour, nmp->nm_krbname,
|
||||
srv_principal, NULL, cred);
|
||||
else
|
||||
@ -475,7 +477,7 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
|
||||
|
||||
procnum = nd->nd_procnum;
|
||||
if ((nd->nd_flag & ND_NFSV4) &&
|
||||
nd->nd_procnum != NFSV4PROC_CBNULL &&
|
||||
nd->nd_procnum != NFSPROC_NULL &&
|
||||
nd->nd_procnum != NFSV4PROC_CBCOMPOUND)
|
||||
procnum = NFSV4PROC_COMPOUND;
|
||||
|
||||
@ -672,14 +674,13 @@ newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
|
||||
rep != NULL && (rep->r_flags & R_DONTRECOVER))
|
||||
nd->nd_repstat = NFSERR_STALEDONTRECOVER;
|
||||
}
|
||||
|
||||
m_freem(nd->nd_mreq);
|
||||
AUTH_DESTROY(auth);
|
||||
if (rep != NULL)
|
||||
FREE((caddr_t)rep, M_NFSDREQ);
|
||||
return (0);
|
||||
}
|
||||
error = EPROTONOSUPPORT;
|
||||
|
||||
m_freem(nd->nd_mreq);
|
||||
AUTH_DESTROY(auth);
|
||||
if (rep != NULL)
|
||||
FREE((caddr_t)rep, M_NFSDREQ);
|
||||
return (0);
|
||||
nfsmout:
|
||||
mbuf_freem(nd->nd_mrep);
|
||||
mbuf_freem(nd->nd_mreq);
|
||||
|
@ -3560,6 +3560,14 @@ nfsrv_docallback(struct nfsclient *clp, int procnum,
|
||||
panic("docallb");
|
||||
}
|
||||
clp->lc_cbref++;
|
||||
|
||||
/*
|
||||
* Fill the callback program# and version into the request
|
||||
* structure for newnfs_connect() to use.
|
||||
*/
|
||||
clp->lc_req.nr_prog = clp->lc_program;
|
||||
clp->lc_req.nr_vers = NFSV4_CBVERS;
|
||||
|
||||
/*
|
||||
* First, fill in some of the fields of nd and cr.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user