aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/xdr4.h
diff options
context:
space:
mode:
authorAndrew Elble <aweits@rit.edu>2016-06-15 12:52:09 -0400
committerJ. Bruce Fields <bfields@redhat.com>2016-07-13 15:32:47 -0400
commited94164398c935a42be7b129a478eb19c598b68a (patch)
tree54e540b879c62b023ff3d0f93ad537209bdf3ff4 /fs/nfsd/xdr4.h
parentnfsd: allow mach_creds_match to be used more broadly (diff)
downloadlinux-dev-ed94164398c935a42be7b129a478eb19c598b68a.tar.xz
linux-dev-ed94164398c935a42be7b129a478eb19c598b68a.zip
nfsd: implement machine credential support for some operations
This addresses the conundrum referenced in RFC5661 18.35.3, and will allow clients to return state to the server using the machine credentials. The biggest part of the problem is that we need to allow the client to send a compound op with integrity/privacy on mounts that don't have it enabled. Add server support for properly decoding and using spo_must_enforce and spo_must_allow bits. Add support for machine credentials to be used for CLOSE, OPEN_DOWNGRADE, LOCKU, DELEGRETURN, and TEST/FREE STATEID. Implement a check so as to not throw WRONGSEC errors when these operations are used if integrity/privacy isn't turned on. Without this, Linux clients with credentials that expired while holding delegations were getting stuck in an endless loop. Signed-off-by: Andrew Elble <aweits@rit.edu> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/xdr4.h')
-rw-r--r--fs/nfsd/xdr4.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
index 74342a7c208a..beea0c5edc51 100644
--- a/fs/nfsd/xdr4.h
+++ b/fs/nfsd/xdr4.h
@@ -59,6 +59,7 @@ struct nfsd4_compound_state {
struct nfsd4_session *session;
struct nfsd4_slot *slot;
int data_offset;
+ bool spo_must_allowed;
size_t iovlen;
u32 minorversion;
__be32 status;
@@ -403,6 +404,8 @@ struct nfsd4_exchange_id {
clientid_t clientid;
u32 seqid;
int spa_how;
+ u32 spo_must_enforce[3];
+ u32 spo_must_allow[3];
};
struct nfsd4_sequence {