freebsd-dev/sys/fs/nfsserver
Rick Macklem e2fe58d61b nfsd: Allow file owners to perform Open(Delegate_cur)
Commit b0b7d978b6 changed the NFSv4 server's default
behaviour to check the file's mode or ACL for permission to
open the file, to be Linux and Solaris compatible.
However, it turns out that Linux makes an exception for
the case of Claim_delegate_cur(_fh).

When a NFSv4 client is returning a delegation, it must
acquire Opens against the server to replace the ones
done locally in the client.  The client does this via
an Open operation with Claim_delegate_cur(_fh).  If
this operation fails, due to a change to the file's
mode or ACL after the delegation was issued, the
client does not have any way to retain the open.

As such, the Linux client allows the file's owner
to perform an Open with Claim_delegate_cur(_fh)
no matter what the mode or ACL allows.

This patch makes the FreeBSD server allow this case,
to be Linux compatible.

This patch only affects the case where delegations
are enabled, which is not the default.

MFC after:	2 weeks
2022-02-02 14:10:16 -08:00
..
nfs_fha_new.c fs: clean up empty lines in .c and .h files 2020-09-01 21:18:40 +00:00
nfs_fha_new.h Re-organize the NFS file handle affinity code for the NFS server. 2020-04-14 00:01:26 +00:00
nfs_nfsdcache.c fs: clean up empty lines in .c and .h files 2020-09-01 21:18:40 +00:00
nfs_nfsdkrpc.c nfsd: fix replies from session cache for retried RPCs 2021-04-08 14:04:22 -07:00
nfs_nfsdport.c nfsd: Do not accept audit/alarm ACEs for the NFSv4 server 2022-01-11 09:40:07 -08:00
nfs_nfsdserv.c nfsd: Allow file owners to perform Open(Delegate_cur) 2022-02-02 14:10:16 -08:00
nfs_nfsdsocket.c nfsd: Fix the NFSv4.2 pNFS MDS server for NFSERR_NOSPC via LayoutError 2021-11-08 15:58:00 -08:00
nfs_nfsdstate.c nfsd: Limit parsing of layout errors to maxcnt bytes 2021-12-13 15:21:31 -08:00
nfs_nfsdsubs.c rpc: Delete AUTH_NEEDS_TLS(_MUTUAL_HOST) auth_stat values 2021-12-23 14:31:53 -08:00