git: 46910ffacbfe - stable/13 - krpc: Remove VNET_NFSD #ifdefs
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 18 May 2023 00:13:36 UTC
The branch stable/13 has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=46910ffacbfeadb08a3421c2d4995d1a244768c4 commit 46910ffacbfeadb08a3421c2d4995d1a244768c4 Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2023-02-14 21:53:39 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2023-05-18 00:12:26 +0000 krpc: Remove VNET_NFSD #ifdefs The consensus is that the VNET_NFSD kernel option is not needed, so this commit removes its use from the kernel RPC. (cherry picked from commit 364391a9bb5eb85af5f711a952ba40a4b1f768da) --- sys/rpc/svc_auth.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/sys/rpc/svc_auth.c b/sys/rpc/svc_auth.c index a5c9753c4fde..22ce83f72bdb 100644 --- a/sys/rpc/svc_auth.c +++ b/sys/rpc/svc_auth.c @@ -198,12 +198,7 @@ svc_getcred(struct svc_req *rqst, struct ucred **crp, int *flavorp) cr->cr_uid = cr->cr_ruid = cr->cr_svuid = xprt->xp_uid; crsetgroups(cr, xprt->xp_ngrps, xprt->xp_gidp); cr->cr_rgid = cr->cr_svgid = xprt->xp_gidp[0]; -#ifdef VNET_NFSD - if (jailed(curthread->td_ucred)) - cr->cr_prison = curthread->td_ucred->cr_prison; - else -#endif - cr->cr_prison = &prison0; + cr->cr_prison = curthread->td_ucred->cr_prison; prison_hold(cr->cr_prison); *crp = cr; return (TRUE); @@ -216,12 +211,7 @@ svc_getcred(struct svc_req *rqst, struct ucred **crp, int *flavorp) cr->cr_uid = cr->cr_ruid = cr->cr_svuid = xcr->cr_uid; crsetgroups(cr, xcr->cr_ngroups, xcr->cr_groups); cr->cr_rgid = cr->cr_svgid = cr->cr_groups[0]; -#ifdef VNET_NFSD - if (jailed(curthread->td_ucred)) - cr->cr_prison = curthread->td_ucred->cr_prison; - else -#endif - cr->cr_prison = &prison0; + cr->cr_prison = curthread->td_ucred->cr_prison; prison_hold(cr->cr_prison); *crp = cr; return (TRUE);