projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
NFSv4: use mach cred for SECINFO_NO_NAME w/ integrity
[linux-2.6-block.git]
/
fs
/
open.c
diff --git
a/fs/open.c
b/fs/open.c
index 9156cb050d0873b65e8083671ef0ffdbe1ff1a47..d53e29895082306747de0998c730159b73d08528 100644
(file)
--- a/
fs/open.c
+++ b/
fs/open.c
@@
-844,6
+844,8
@@
static inline int build_open_flags(int flags, umode_t mode, struct open_flags *o
if ((flags & O_TMPFILE_MASK) != O_TMPFILE)
return -EINVAL;
acc_mode = MAY_OPEN | ACC_MODE(flags);
+ if (!(acc_mode & MAY_WRITE))
+ return -EINVAL;
} else if (flags & O_PATH) {
/*
* If we have O_PATH in the open flag. Then we