projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
coredump: suppress uid comparison test if core output files are pipes
[firefly-linux-kernel-4.4.55.git]
/
fs
/
exec.c
diff --git
a/fs/exec.c
b/fs/exec.c
index 829a6c6d180397d580dcb60e6e11c8750a299576..49cdaa19e5b9b800f9c23b8770f28e4cb33c8fbf 100644
(file)
--- a/
fs/exec.c
+++ b/
fs/exec.c
@@
-1936,8
+1936,9
@@
void do_coredump(long signr, int exit_code, struct pt_regs *regs)
/*
* Dont allow local users get cute and trick others to coredump
* into their pre-created files:
/*
* Dont allow local users get cute and trick others to coredump
* into their pre-created files:
+ * Note, this is not relevant for pipes
*/
*/
- if (
inode->i_uid != current_fsuid(
))
+ if (
!ispipe && (inode->i_uid != current_fsuid()
))
goto close_fail;
if (!cprm.file->f_op)
goto close_fail;
goto close_fail;
if (!cprm.file->f_op)
goto close_fail;