diff options
author | James Morris <jmorris@namei.org> | 2008-01-12 06:05:48 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2008-01-24 19:29:52 -0500 |
commit | c43e259cc756ece387faae849af0058b56d78466 (patch) | |
tree | 1f1541560256b9fe2eeda5b07100baa14f39df59 /fs/splice.c | |
parent | bced95283e9434611cbad8f2ff903cd396eaea72 (diff) |
security: call security_file_permission from rw_verify_area
All instances of rw_verify_area() are followed by a call to
security_file_permission(), so just call the latter from the former.
Acked-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'fs/splice.c')
-rw-r--r-- | fs/splice.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/splice.c b/fs/splice.c index 6bdcb6107bc3..56b802bfbfa4 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -908,10 +908,6 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out, | |||
908 | if (unlikely(ret < 0)) | 908 | if (unlikely(ret < 0)) |
909 | return ret; | 909 | return ret; |
910 | 910 | ||
911 | ret = security_file_permission(out, MAY_WRITE); | ||
912 | if (unlikely(ret < 0)) | ||
913 | return ret; | ||
914 | |||
915 | return out->f_op->splice_write(pipe, out, ppos, len, flags); | 911 | return out->f_op->splice_write(pipe, out, ppos, len, flags); |
916 | } | 912 | } |
917 | 913 | ||
@@ -934,10 +930,6 @@ static long do_splice_to(struct file *in, loff_t *ppos, | |||
934 | if (unlikely(ret < 0)) | 930 | if (unlikely(ret < 0)) |
935 | return ret; | 931 | return ret; |
936 | 932 | ||
937 | ret = security_file_permission(in, MAY_READ); | ||
938 | if (unlikely(ret < 0)) | ||
939 | return ret; | ||
940 | |||
941 | return in->f_op->splice_read(in, ppos, pipe, len, flags); | 933 | return in->f_op->splice_read(in, ppos, pipe, len, flags); |
942 | } | 934 | } |
943 | 935 | ||