]> rtime.felk.cvut.cz Git - linux-imx.git/commit
NFSv4: Add ACCESS operation to OPEN compound
authorWeston Andros Adamson <dros@netapp.com>
Mon, 10 Sep 2012 18:00:46 +0000 (14:00 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Mon, 1 Oct 2012 22:20:11 +0000 (15:20 -0700)
commit6168f62cbde8dcf4f58255794efbcdb8df603959
tree897bac0b7539172aa171365337d964f7984b1a80
parent57a51048da742c764b6ce5d028c7f334ae04d363
NFSv4: Add ACCESS operation to OPEN compound

The OPEN operation has no way to differentiate an open for read and an
open for execution - both look like read to the server. This allowed
users to read files that didn't have READ access but did have EXEC access,
which is obviously wrong.

This patch adds an ACCESS call to the OPEN compound to handle the
difference between OPENs for reading and execution.  Since we're going
through the trouble of calling ACCESS, we check all possible access bits
and cache the results hopefully avoiding an ACCESS call in the future.

Signed-off-by: Weston Andros Adamson <dros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/dir.c
fs/nfs/nfs4proc.c
fs/nfs/nfs4xdr.c
include/linux/nfs_fs.h
include/linux/nfs_xdr.h