Use suser_cred(9) instead of checking cr_uid directly.

Reviewed by:	rwatson
This commit is contained in:
pjd 2006-06-27 11:29:38 +00:00
parent 03a43a81a3
commit 9de1945c3f

View File

@ -815,7 +815,7 @@ ktrops(td, p, ops, facs, vp)
p->p_tracecred = crhold(td->td_ucred);
}
p->p_traceflag |= facs;
if (td->td_ucred->cr_uid == 0)
if (suser_cred(td->td_ucred, SUSER_ALLOWJAIL) == 0)
p->p_traceflag |= KTRFAC_ROOT;
} else {
/* KTROP_CLEAR */