projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
[powerpc.git]
/
fs
/
exec.c
diff --git
a/fs/exec.c
b/fs/exec.c
index
4ccaaa4
..
282240a
100644
(file)
--- a/
fs/exec.c
+++ b/
fs/exec.c
@@
-1780,6
+1780,12
@@
int do_coredump(long signr, int exit_code, struct pt_regs * regs)
but keep the previous behaviour for now. */
if (!ispipe && !S_ISREG(inode->i_mode))
goto close_fail;
but keep the previous behaviour for now. */
if (!ispipe && !S_ISREG(inode->i_mode))
goto close_fail;
+ /*
+ * Dont allow local users get cute and trick others to coredump
+ * into their pre-created files:
+ */
+ if (inode->i_uid != current->fsuid)
+ goto close_fail;
if (!file->f_op)
goto close_fail;
if (!file->f_op->write)
if (!file->f_op)
goto close_fail;
if (!file->f_op->write)