OSDN Git Service

nfsd: add support for upcall version 2
authorScott Mayhew <smayhew@redhat.com>
Mon, 9 Sep 2019 20:10:31 +0000 (16:10 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 10 Sep 2019 13:26:33 +0000 (09:26 -0400)
commit6ee95d1c899186c0798cafd25998d436bcdb9618
treebb09ebc1cd0334919aa8245f4fc8b1d486699709
parent11a60d159259dbadf9188534b508e5003769af61
nfsd: add support for upcall version 2

Version 2 upcalls will allow the nfsd to include a hash of the kerberos
principal string in the Cld_Create upcall.  If a principal is present in
the svc_cred, then the hash will be included in the Cld_Create upcall.
We attempt to use the svc_cred.cr_raw_principal (which is returned by
gssproxy) first, and then fall back to using the svc_cred.cr_principal
(which is returned by both gssproxy and rpc.svcgssd).  Upon a subsequent
restart, the hash will be returned in the Cld_Gracestart downcall and
stored in the reclaim_str_hashtbl so it can be used when handling
reclaim opens.

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4recover.c
fs/nfsd/nfs4state.c
fs/nfsd/state.h
include/uapi/linux/nfsd/cld.h