nfsd4: fix READ permission checking
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 3 Apr 2015 21:19:41 +0000 (17:19 -0400)
committerSasha Levin <sasha.levin@oracle.com>
Sun, 17 May 2015 23:12:25 +0000 (19:12 -0400)
commit5a9fb83ea5da6f96708e88e39d352730a02fc8b0
tree1fbb9dbb00da03bd3eca70b4b0fe90049cbd1bae
parentc5f77349d6694a2ce04536343fee87a0de74522d
nfsd4: fix READ permission checking

[ Upstream commit 6e4891dc289cd191d46ab7ba1dcb29646644f9ca ]

In the case we already have a struct file (derived from a stateid), we
still need to do permission-checking; otherwise an unauthorized user
could gain access to a file by sniffing or guessing somebody else's
stateid.

Cc: stable@vger.kernel.org
Fixes: dc97618ddda9 "nfsd4: separate splice and readv cases"
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
fs/nfsd/nfs4xdr.c