]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
coredump: use SUID_DUMPABLE_ENABLED rather than hardcoded 1
authorOleg Nesterov <oleg@redhat.com>
Fri, 28 Sep 2012 00:22:14 +0000 (10:22 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Oct 2012 05:04:02 +0000 (15:04 +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 8fd00b375bfa9d7faade04d1d4dea0ee15b8642e..2490dbbb903cdc76bd7164ed2270872c60739f6d 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;
 }