HomeFreeBSD

nfsd: Pre-parse the next NFSv4 operation number for put FH operations

Description

nfsd: Pre-parse the next NFSv4 operation number for put FH operations

RFC5661 Sec. 2.6 specifies when a NFSERR_WRONGSEC error reply can be done.
For the four operations PutFH, PutrootFH, PutpublicFH and RestoreFH,
NFSERR_WRONGSEC can or cannot be replied, depending upon what operation
follows one of these operations in the compound.

This patch modifies nfsrvd_compound() so that it parses the next operation
number before executing any of the above four operations, storing it in
"nextop".

A future commit will implement use of "nextop" to decide if NFSERR_WRONGSEC
can be replied for the above four operations.

This commit should not change the semantics of performing the compound RPC.

(cherry picked from commit d224f05fcfc13725c43ea0a02d511b3bf6a8ad14)

Details

Provenance
rmacklemAuthored on Jun 4 2021, 3:48 AM
Parents
rG92500ec0c45c: nfsd: Fix the failure return for non-fh NFSv4 operations
Branches
Unknown
Tags
Unknown