diff options
author | J. Bruce Fields <bfields@redhat.com> | 2013-05-14 16:07:13 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2013-07-01 17:23:06 -0400 |
commit | 0dc1531aca7fd1440918bd55844a054e9c29acad (patch) | |
tree | 3bed6a56a709b4781d8108f7a5b7546a6685fd09 /include/linux/sunrpc/svcauth.h | |
parent | 442340639194762df7e61e8aabae44a18896eca1 (diff) |
svcrpc: store gss mech in svc_cred
Store a pointer to the gss mechanism used in the rq_cred and cl_cred.
This will make it easier to enforce SP4_MACH_CRED, which needs to
compare the mechanism used on the exchange_id with that used on
protected operations.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'include/linux/sunrpc/svcauth.h')
-rw-r--r-- | include/linux/sunrpc/svcauth.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index 95c956613a9c..8d71d6577459 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/string.h> | 14 | #include <linux/string.h> |
15 | #include <linux/sunrpc/msg_prot.h> | 15 | #include <linux/sunrpc/msg_prot.h> |
16 | #include <linux/sunrpc/cache.h> | 16 | #include <linux/sunrpc/cache.h> |
17 | #include <linux/sunrpc/gss_api.h> | ||
17 | #include <linux/hash.h> | 18 | #include <linux/hash.h> |
18 | #include <linux/cred.h> | 19 | #include <linux/cred.h> |
19 | 20 | ||
@@ -23,6 +24,7 @@ struct svc_cred { | |||
23 | struct group_info *cr_group_info; | 24 | struct group_info *cr_group_info; |
24 | u32 cr_flavor; /* pseudoflavor */ | 25 | u32 cr_flavor; /* pseudoflavor */ |
25 | char *cr_principal; /* for gss */ | 26 | char *cr_principal; /* for gss */ |
27 | struct gss_api_mech *cr_gss_mech; | ||
26 | }; | 28 | }; |
27 | 29 | ||
28 | static inline void init_svc_cred(struct svc_cred *cred) | 30 | static inline void init_svc_cred(struct svc_cred *cred) |
@@ -37,6 +39,8 @@ static inline void free_svc_cred(struct svc_cred *cred) | |||
37 | if (cred->cr_group_info) | 39 | if (cred->cr_group_info) |
38 | put_group_info(cred->cr_group_info); | 40 | put_group_info(cred->cr_group_info); |
39 | kfree(cred->cr_principal); | 41 | kfree(cred->cr_principal); |
42 | gss_mech_put(cred->cr_gss_mech); | ||
43 | init_svc_cred(cred); | ||
40 | } | 44 | } |
41 | 45 | ||
42 | struct svc_rqst; /* forward decl */ | 46 | struct svc_rqst; /* forward decl */ |