Make the check easier to read.

Obtained from:	WHEEL Systems
This commit is contained in:
Pawel Jakub Dawidek 2012-12-16 14:14:18 +00:00
parent b039f8c2aa
commit 7e73ee85ab

View file

@ -3218,8 +3218,7 @@ coredump(struct thread *td)
#endif
return (EINVAL);
}
if (((sugid_coredump == 0) && p->p_flag & P_SUGID) ||
do_coredump == 0) {
if (!do_coredump || (!sugid_coredump && (p->p_flag & P_SUGID) != 0)) {
PROC_UNLOCK(p);
#ifdef AUDIT
audit_proc_coredump(td, name, EFAULT);