From 08e6ce8fa14aad2640a5d9ba45f846bfc1d11450 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Wed, 26 Sep 2012 11:34:53 +1000 Subject: [PATCH] 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. Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton --- fs/exec.c | 2 +- fs/proc/internal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/exec.c b/fs/exec.c index 11c47eda0bec..e8c0da2c94f8 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1096,7 +1096,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..863b8c7ab4c7 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; } -- 2.39.5