Message ID | 1501545093-56634-12-git-send-email-keescook@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, 31 Jul 2017, Kees Cook wrote: > Cc: David Howells <dhowells@redhat.com> > Signed-off-by: Kees Cook <keescook@chromium.org> > Acked-by: Serge Hallyn <serge@hallyn.com> > --- > fs/exec.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: James Morris <james.l.morris@oracle.com>
diff --git a/fs/exec.c b/fs/exec.c index f9997ea6414e..708a72f93320 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1348,8 +1348,7 @@ void setup_new_exec(struct linux_binprm * bprm) */ current->mm->task_size = TASK_SIZE; - if (!uid_eq(bprm->cred->uid, current_euid()) || - !gid_eq(bprm->cred->gid, current_egid())) { + if (bprm->secureexec) { current->pdeath_signal = 0; } else { if (bprm->interp_flags & BINPRM_FLAGS_ENFORCE_NONDUMP)