mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
coredump: accept any write method
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
283e7e5d24
commit
86cc05840a
@ -657,7 +657,7 @@ void do_coredump(const siginfo_t *siginfo)
|
||||
*/
|
||||
if (!uid_eq(inode->i_uid, current_fsuid()))
|
||||
goto close_fail;
|
||||
if (!cprm.file->f_op->write)
|
||||
if (!(cprm.file->f_mode & FMODE_CAN_WRITE))
|
||||
goto close_fail;
|
||||
if (do_truncate(cprm.file->f_path.dentry, 0, 0, cprm.file))
|
||||
goto close_fail;
|
||||
|
Loading…
Reference in New Issue
Block a user