aboutsummaryrefslogtreecommitdiffstats
path: root/fs/coredump.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2013-02-27 20:03:15 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-27 22:10:11 -0500
commite579d2c259be42b6f29458327e5153b22414b031 (patch)
treeac3babd0f075ddfeb5e6fa083651852b34a0a79f /fs/coredump.c
parent5d1fadc1472396d602f0eeb10d37519e2a14e8bc (diff)
coredump: remove redundant defines for dumpable states
The existing SUID_DUMP_* defines duplicate the newer SUID_DUMPABLE_* defines introduced in 54b501992dd2 ("coredump: warn about unsafe suid_dumpable / core_pattern combo"). Remove the new ones, and use the prior values instead. Signed-off-by: Kees Cook <keescook@chromium.org> Reported-by: Chen Gang <gang.chen@asianux.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Alan Cox <alan@linux.intel.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Doug Ledford <dledford@redhat.com> Cc: Serge Hallyn <serge.hallyn@canonical.com> Cc: James Morris <james.l.morris@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/coredump.c')
-rw-r--r--fs/coredump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/coredump.c b/fs/coredump.c
index 69baf903d3bd..c6479658d487 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -501,7 +501,7 @@ void do_coredump(siginfo_t *siginfo)
501 * so we dump it as root in mode 2, and only into a controlled 501 * so we dump it as root in mode 2, and only into a controlled
502 * environment (pipe handler or fully qualified path). 502 * environment (pipe handler or fully qualified path).
503 */ 503 */
504 if (__get_dumpable(cprm.mm_flags) == SUID_DUMPABLE_SAFE) { 504 if (__get_dumpable(cprm.mm_flags) == SUID_DUMP_ROOT) {
505 /* Setuid core dump mode */ 505 /* Setuid core dump mode */
506 flag = O_EXCL; /* Stop rewrite attacks */ 506 flag = O_EXCL; /* Stop rewrite attacks */
507 cred->fsuid = GLOBAL_ROOT_UID; /* Dump root private */ 507 cred->fsuid = GLOBAL_ROOT_UID; /* Dump root private */