Use the thread's ucred struct when fetching jid or jailname.

Reported by:	mjg
X-MFC with:	r327888
This commit is contained in:
markj 2018-01-14 17:55:40 +00:00
parent 9c7cac637a
commit f1eb0fc41a

View File

@ -3664,14 +3664,14 @@ dtrace_dif_variable(dtrace_mstate_t *mstate, dtrace_state_t *state, uint64_t v,
return (0);
return (dtrace_dif_varstr(
(uintptr_t)curthread->t_procp->p_ucred->cr_prison->pr_name,
(uintptr_t)curthread->td_ucred->cr_prison->pr_name,
state, mstate));
case DIF_VAR_JID:
if (!dtrace_priv_kernel(state))
return (0);
return ((uint64_t)curthread->t_procp->p_ucred->cr_prison->pr_id);
return ((uint64_t)curthread->td_ucred->cr_prison->pr_id);
#else
return (0);
#endif