aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/exec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 4ccaaa4b13b2..282240afe99e 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1780,6 +1780,12 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs)
1780 but keep the previous behaviour for now. */ 1780 but keep the previous behaviour for now. */
1781 if (!ispipe && !S_ISREG(inode->i_mode)) 1781 if (!ispipe && !S_ISREG(inode->i_mode))
1782 goto close_fail; 1782 goto close_fail;
1783 /*
1784 * Dont allow local users get cute and trick others to coredump
1785 * into their pre-created files:
1786 */
1787 if (inode->i_uid != current->fsuid)
1788 goto close_fail;
1783 if (!file->f_op) 1789 if (!file->f_op)
1784 goto close_fail; 1790 goto close_fail;
1785 if (!file->f_op->write) 1791 if (!file->f_op->write)