diff options
-rw-r--r-- | sys/kern/kern_prot.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 127d10c20264..f0b4ff8b11df 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1178,9 +1178,9 @@ p_candebug(struct proc *p1, struct proc *p2, int *privused) /* not owned by you, has done setuid (unless you're root) */ /* add a CAP_SYS_PTRACE here? */ - if (p1->p_cred->pc_ucred->cr_uid != p2->p_cred->p_ruid || - p1->p_cred->p_ruid != p2->p_cred->p_ruid || - p1->p_cred->p_svuid != p2->p_cred->p_ruid || + if (p1->p_cred->pc_ucred->cr_uid != p2->p_cred->pc_ucred->cr_uid || + p1->p_cred->pc_ucred->cr_uid != p2->p_cred->p_svuid || + p1->p_cred->pc_ucred->cr_uid != p2->p_cred->p_ruid || p2->p_flag & P_SUGID) { if ((error = suser_xxx(0, p1, PRISON_ROOT))) return (error); |