Commit 4f76435
committed
NFSD: Define actions for the new time_deleg FATTR4 attributes
NFSv4 clients won't send legitimate GETATTR requests for these new
attributes because they are intended to be used only with CB_GETATTR
and SETATTR. But NFSD has to do something besides crashing if it
ever sees a GETATTR request that queries these attributes.
RFC 8881 Section 18.7.3 states:
> The server MUST return a value for each attribute that the client
> requests if the attribute is supported by the server for the
> target file system. If the server does not support a particular
> attribute on the target file system, then it MUST NOT return the
> attribute value and MUST NOT set the attribute bit in the result
> bitmap. The server MUST return an error if it supports an
> attribute on the target but cannot obtain its value. In that case,
> no attribute values will be returned.
Further, RFC 9754 Section 5 states:
> These new attributes are invalid to be used with GETATTR, VERIFY,
> and NVERIFY, and they can only be used with CB_GETATTR and SETATTR
> by a client holding an appropriate delegation.
Thus there does not appear to be a specific server response mandated
by specification. Taking the guidance that querying these attributes
via GETATTR is "invalid", NFSD will return nfserr_inval, failing the
request entirely.
Reported-by: Robert Morris <[email protected]>
Closes: https://lore.kernel.org/linux-nfs/[email protected]/T/#t
Fixes: 51c0d4f ("nfsd: add support for FATTR4_OPEN_ARGUMENTS")
Cc: [email protected]
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>1 parent 4b47a86 commit 4f76435
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2939 | 2939 | | |
2940 | 2940 | | |
2941 | 2941 | | |
| 2942 | + | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
2942 | 2948 | | |
2943 | 2949 | | |
2944 | 2950 | | |
| |||
3560 | 3566 | | |
3561 | 3567 | | |
3562 | 3568 | | |
| 3569 | + | |
| 3570 | + | |
3563 | 3571 | | |
3564 | 3572 | | |
3565 | 3573 | | |
| |||
0 commit comments