diff options
author | J. Bruce Fields <bfields@redhat.com> | 2013-05-14 16:53:40 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2013-07-01 17:23:06 -0400 |
commit | 442340639194762df7e61e8aabae44a18896eca1 (patch) | |
tree | 95adc5287a1c3c43b50e0d12183d8bd5a596e43b /include/linux/sunrpc | |
parent | 0de934936b731ca49ece266284da3c7cb402c74e (diff) |
svcrpc: introduce init_svc_cred
Common helper to zero out fields of the svc_cred.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/svcauth.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index ff374ab30839..95c956613a9c 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
@@ -25,6 +25,13 @@ struct svc_cred { | |||
25 | char *cr_principal; /* for gss */ | 25 | char *cr_principal; /* for gss */ |
26 | }; | 26 | }; |
27 | 27 | ||
28 | static inline void init_svc_cred(struct svc_cred *cred) | ||
29 | { | ||
30 | cred->cr_group_info = NULL; | ||
31 | cred->cr_principal = NULL; | ||
32 | cred->cr_gss_mech = NULL; | ||
33 | } | ||
34 | |||
28 | static inline void free_svc_cred(struct svc_cred *cred) | 35 | static inline void free_svc_cred(struct svc_cred *cred) |
29 | { | 36 | { |
30 | if (cred->cr_group_info) | 37 | if (cred->cr_group_info) |