OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47e3936
)
acct: check FMODE_CAN_WRITE
author
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 31 Mar 2015 16:30:48 +0000
(12:30 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Sun, 12 Apr 2015 02:27:55 +0000
(22:27 -0400)
it's not calling ->write() directly anymore.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
kernel/acct.c
patch
|
blob
|
history
diff --git
a/kernel/acct.c
b/kernel/acct.c
index
e6c10d1
..
74963d1
100644
(file)
--- a/
kernel/acct.c
+++ b/
kernel/acct.c
@@
-213,7
+213,7
@@
static int acct_on(struct filename *pathname)
return -EACCES;
}
- if (!
file->f_op->write
) {
+ if (!
(file->f_mode & FMODE_CAN_WRITE)
) {
kfree(acct);
filp_close(file, NULL);
return -EIO;