projects/linux·commit a2218cac

Merge master.kernel.org:/pub/scm/linux/kernel/git/chrisw/lsm-2.6

a2218cac · Linus Torvalds <[email protected]> · 2005-09-30 08:38:46 -07:00

Commit
a2218cac0aacecbecebd3cabc43cc8a4a09cecbb
Parents
a44fe13e · 411b67b4

Merge commit. Changes below are compared with the first parent: a44fe13e.

Changes

1 files changed · +3 −0

FileStatusAddDelContent
fs/read_write.cmodified+3−0View file

fs/read_write.c

View file
diff --git a/fs/read_write.c b/fs/read_write.c
index b60324a..a091ee4 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) {