summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2018-08-16 12:05:59 -0400
committerJ. Bruce Fields <bfields@redhat.com>2018-08-22 18:32:07 -0400
commit9abdda5ddab8a899ca8c4b859ef0a7710f40e0dd (patch)
tree4045d8a30dcf6e4ff5fcf8f053d57f9c5305c9be /include/linux
parenta1a237775ec8fd2694b9f8e451821fd168e730d8 (diff)
downloadlinux-9abdda5ddab8a899ca8c4b859ef0a7710f40e0dd.tar.gz
linux-9abdda5ddab8a899ca8c4b859ef0a7710f40e0dd.tar.bz2
linux-9abdda5ddab8a899ca8c4b859ef0a7710f40e0dd.zip
sunrpc: Extract target name into svc_cred
NFSv4.0 callback needs to know the GSS target name the client used when it established its lease. That information is available from the GSS context created by gssproxy. Make it available in each svc_cred. Note this will also give us access to the real target service principal name (which is typically "nfs", but spec does not require that). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sunrpc/svcauth.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h
index 7c3656505847..04e404a07882 100644
--- a/include/linux/sunrpc/svcauth.h
+++ b/include/linux/sunrpc/svcauth.h
@@ -31,6 +31,7 @@ struct svc_cred {
/* name of form servicetype@hostname, passed down by
* rpc.svcgssd, or computed from the above: */
char *cr_principal;
+ char *cr_targ_princ;
struct gss_api_mech *cr_gss_mech;
};
@@ -39,6 +40,7 @@ static inline void init_svc_cred(struct svc_cred *cred)
cred->cr_group_info = NULL;
cred->cr_raw_principal = NULL;
cred->cr_principal = NULL;
+ cred->cr_targ_princ = NULL;
cred->cr_gss_mech = NULL;
}
@@ -48,6 +50,7 @@ static inline void free_svc_cred(struct svc_cred *cred)
put_group_info(cred->cr_group_info);
kfree(cred->cr_raw_principal);
kfree(cred->cr_principal);
+ kfree(cred->cr_targ_princ);
gss_mech_put(cred->cr_gss_mech);
init_svc_cred(cred);
}