diff --git a/sys/rpc/svc_auth.c b/sys/rpc/svc_auth.c index 6d5a79b00036..2d2b73de1704 100644 --- a/sys/rpc/svc_auth.c +++ b/sys/rpc/svc_auth.c @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -181,6 +182,8 @@ svc_getcred(struct svc_req *rqst, struct ucred **crp, int *flavorp) for (i = 0; i < xcr->cr_ngroups; i++) cr->cr_groups[i] = xcr->cr_groups[i]; cr->cr_rgid = cr->cr_svgid = cr->cr_groups[0]; + cr->cr_prison = &prison0; + prison_hold(cr->cr_prison); *crp = cr; return (TRUE);