J. Bruce Fields a043226bc1 nfsd4: permit read opens of executable-only files
A client that wants to execute a file must be able to read it.  Read
opens over nfs are therefore implicitly allowed for executable files
even when those files are not readable.

NFSv2/v3 get this right by using a passed-in NFSD_MAY_OWNER_OVERRIDE on
read requests, but NFSv4 has gotten this wrong ever since
dc730e173785e29b297aa605786c94adaffe2544 "nfsd4: fix owner-override on
open", when we realized that the file owner shouldn't override
permissions on non-reclaim NFSv4 opens.

So we can't use NFSD_MAY_OWNER_OVERRIDE to tell nfsd_permission to allow
reads of executable files.

So, do the same thing we do whenever we encounter another weird NFS
permission nit: define yet another NFSD_MAY_* flag.

The industry's future standardization on 128-bit processors will be
motivated primarily by the need for integers with enough bits for all
the NFSD_MAY_* flags.

Reported-by: Leonardo Borda <leonardoborda@gmail.com>
Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2011-08-27 14:20:20 -04:00
..
2011-01-04 18:22:10 -05:00
2008-02-01 16:42:05 -05:00
2011-07-18 09:39:01 -04:00
2007-05-09 12:30:54 -07:00
2011-03-07 12:05:09 -05:00
2011-07-18 09:39:01 -04:00
2011-08-26 18:22:52 -04:00
2011-08-26 18:22:48 -04:00
2011-07-18 09:39:01 -04:00
2011-03-31 11:26:23 -03:00
2011-08-19 13:25:31 -04:00
2011-05-10 10:16:21 +02:00
2011-07-18 09:39:01 -04:00