]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nfsd4: don't allow owner override on 4.1 CLAIM_FH opens
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 3 May 2013 20:09:09 +0000 (16:09 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 May 2013 18:38:19 +0000 (11:38 -0700)
commitfaad5f5c7478207a175f41d676db58b8fc8449f2
tree7b794e01ad6e63b75db5f493b1e2d760828de094
parent6bc7f6efc8451170ce0b70f3f5e08202109e1702
nfsd4: don't allow owner override on 4.1 CLAIM_FH opens

commit 9f415eb25574db4b73a9a712a4438e41dc284922 upstream.

The Linux client is using CLAIM_FH to implement regular opens, not just
recovery cases, so it depends on the server to check permissions
correctly.

Therefore the owner override, which may make sense in the delegation
recovery case, isn't right in the CLAIM_FH case.

Symptoms: on a client with 49f9a0fafd844c32f2abada047c0b9a5ba0d6255
"NFSv4.1: Enable open-by-filehandle", Bryan noticed this:

touch test.txt
chmod 000 test.txt
echo test > test.txt

succeeding.

Reported-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfs4proc.c