summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-09-30 08:38:46 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-30 08:38:46 -0700
commita2218cac0aacecbecebd3cabc43cc8a4a09cecbb (patch)
tree70bc7d07d3af54f125c28154684c1394a1a6bd66
parenta44fe13eab664ac488ced0845d9885b019bd24c5 (diff)
parent411b67b4b6a4dd1e0292a6a58dd753978179d173 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/chrisw/lsm-2.6
-rw-r--r--fs/read_write.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/read_write.c b/fs/read_write.c
index b60324aaa2b6..a091ee4f430d 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -499,6 +499,9 @@ static ssize_t do_readv_writev(int type, struct file *file,
ret = rw_verify_area(type, file, pos, tot_len);
if (ret)
goto out;
+ ret = security_file_permission(file, type == READ ? MAY_READ : MAY_WRITE);
+ if (ret)
+ goto out;
fnv = NULL;
if (type == READ) {