coredump: remove redundant defines for dumpable states

The existing SUID_DUMP_* defines duplicate the newer SUID_DUMPABLE_*
defines introduced in 54b501992d ("coredump: warn about unsafe
suid_dumpable / core_pattern combo").  Remove the new ones, and use the
prior values instead.

Signed-off-by: Kees Cook <[email protected]>
Reported-by: Chen Gang <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Alan Cox <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Doug Ledford <[email protected]>
Cc: Serge Hallyn <[email protected]>
Cc: James Morris <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Kees Cook 2013-02-27 17:03:15 -08:00 • committed by Linus Torvalds
commit e579d2c259
5 changed files with 9 additions and 13 deletions

View file

@ -11,6 +11,7 @@
#include <linux/sched.h>
#include <linux/proc_fs.h>
#include <linux/binfmts.h>
struct ctl_table_header;
struct mempolicy;
@ -108,7 +109,7 @@ static inline int task_dumpable(struct task_struct *task)
if (mm)
dumpable = get_dumpable(mm);
task_unlock(task);
if (dumpable == SUID_DUMPABLE_ENABLED)
if (dumpable == SUID_DUMP_USER)
return 1;
return 0;
}