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.

MFC after: 2 weeks

Details

Provenance
rmacklemAuthored on Jun 4 2021, 3:48 AM
Parents
rGf9b1e711f0d8: fdescfs: add an option to return underlying file vnode on lookup
Branches
Unknown
Tags
Unknown