HomeFreeBSD

nfsd: Fix when NFSERR_WRONGSEC may be replied to NFSv4 clients

Description

nfsd: Fix when NFSERR_WRONGSEC may be replied to NFSv4 clients

Commit d224f05fcfc1 pre-parsed the next operation number for
the put file handle operations. This patch uses this next
operation number, plus the type of the file handle being set by
the put file handle operation, to implement the rules in RFC5661
Sec. 2.6 with respect to replying NFSERR_WRONGSEC.

This patch also adds a check to see if NFSERR_WRONGSEC should be
replied when about to perform Lookup, Lookupp or Open with a file
name component, so that the NFSERR_WRONGSEC reply is done for
these operations, as required by RFC5661 Sec. 2.6.

This patch does not have any practical effect for the FreeBSD NFSv4
client and I believe that the same is true for the Linux client,
since NFSERR_WRONGSEC is considered a fatal error at this time.

(cherry picked from commit a5df139ec614c34f505bce9de3447fe7b49016e6)

Details

Provenance
rmacklemAuthored on Jun 5 2021, 11:53 PM
Parents
rG54ccbc9bb6c5: nfsd: Pre-parse the next NFSv4 operation number for put FH operations
Branches
Unknown
Tags
Unknown