Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Feb 2023 21:54:30 GMT
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 364391a9bb5e - main - krpc: Remove VNET_NFSD #ifdefs
Message-ID:  <202302142154.31ELsU2p088218@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by rmacklem:

URL: https://cgit.FreeBSD.org/src/commit/?id=364391a9bb5eb85af5f711a952ba40a4b1f768da

commit 364391a9bb5eb85af5f711a952ba40a4b1f768da
Author:     Rick Macklem <rmacklem@FreeBSD.org>
AuthorDate: 2023-02-14 21:53:39 +0000
Commit:     Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2023-02-14 21:53:39 +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.
    
    MFC after:      3 months
---
 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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302142154.31ELsU2p088218>