]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
coredump: use SUID_DUMPABLE_ENABLED rather than hardcoded 1
authorOleg Nesterov <oleg@redhat.com>
Wed, 26 Sep 2012 01:34:53 +0000 (11:34 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 26 Sep 2012 05:45:36 +0000 (15:45 +1000)
Cosmetic. Change setup_new_exec() and task_dumpable() to use
SUID_DUMPABLE_ENABLED for /bin/grep.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/exec.c
fs/proc/internal.h

index 11c47eda0bec450d0dbe2be00b7db563afd4e7a5..e8c0da2c94f8573cf1d46e8d427d8a9f8f526ba3 100644 (file)
--- 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);
 
index 67925a7bd8cb757f56db940efcff1fe9c7ef112a..863b8c7ab4c773eae6e579a1e542fb34125926e8 100644 (file)
@@ -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;
 }