From: Oleg Nesterov Date: Fri, 5 Oct 2012 00:15:27 +0000 (-0700) Subject: coredump: use SUID_DUMPABLE_ENABLED rather than hardcoded 1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0f4cfb2e4e7a7e4e97a3e90e2ba1062f07fb2cb1;p=linux-beck.git coredump: use SUID_DUMPABLE_ENABLED rather than hardcoded 1 Cosmetic. Change setup_new_exec() and task_dumpable() to use SUID_DUMPABLE_ENABLED for /bin/grep. [akpm@linux-foundation.org: checkpatch fixes] Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/exec.c b/fs/exec.c index bd941a1cdbfc..9824473a7ec1 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1097,7 +1097,7 @@ void setup_new_exec(struct linux_binprm * bprm) current->sas_ss_sp = current->sas_ss_size = 0; if (uid_eq(current_euid(), current_uid()) && gid_eq(current_egid(), current_gid())) - set_dumpable(current->mm, 1); + set_dumpable(current->mm, SUID_DUMPABLE_ENABLED); else set_dumpable(current->mm, suid_dumpable); diff --git a/fs/proc/internal.h b/fs/proc/internal.h index 67925a7bd8cb..cceaab07ad54 100644 --- a/fs/proc/internal.h +++ b/fs/proc/internal.h @@ -103,7 +103,7 @@ static inline int task_dumpable(struct task_struct *task) if (mm) dumpable = get_dumpable(mm); task_unlock(task); - if(dumpable == 1) + if (dumpable == SUID_DUMPABLE_ENABLED) return 1; return 0; }