diff options
| author | J. Bruce Fields <bfields@redhat.com> | 2012-05-14 19:55:22 -0400 |
|---|---|---|
| committer | J. Bruce Fields <bfields@redhat.com> | 2012-05-31 20:29:55 -0400 |
| commit | 03a4e1f6ddf25f48848e1bddcffc0ad489648331 (patch) | |
| tree | f140e3deb767d092eca997037ebb7b098d8afce9 /include/linux/sunrpc | |
| parent | 631fc9ea05c97e5d1d14ea58a7347be4857d09da (diff) | |
nfsd4: move principal name into svc_cred
Instead of keeping the principal name associated with a request in a
structure that's private to auth_gss and using an accessor function,
move it to 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 | 9 | ||||
| -rw-r--r-- | include/linux/sunrpc/svcauth_gss.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index 2c54683b91de..16fe477a96e0 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
| @@ -15,13 +15,22 @@ | |||
| 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/hash.h> | 17 | #include <linux/hash.h> |
| 18 | #include <linux/cred.h> | ||
| 18 | 19 | ||
| 19 | struct svc_cred { | 20 | struct svc_cred { |
| 20 | uid_t cr_uid; | 21 | uid_t cr_uid; |
| 21 | gid_t cr_gid; | 22 | gid_t cr_gid; |
| 22 | struct group_info *cr_group_info; | 23 | struct group_info *cr_group_info; |
| 24 | char *cr_principal; /* for gss */ | ||
| 23 | }; | 25 | }; |
| 24 | 26 | ||
| 27 | static inline void free_svc_cred(struct svc_cred *cred) | ||
| 28 | { | ||
| 29 | if (cred->cr_group_info) | ||
| 30 | put_group_info(cred->cr_group_info); | ||
| 31 | kfree(cred->cr_principal); | ||
| 32 | } | ||
| 33 | |||
| 25 | struct svc_rqst; /* forward decl */ | 34 | struct svc_rqst; /* forward decl */ |
| 26 | struct in6_addr; | 35 | struct in6_addr; |
| 27 | 36 | ||
diff --git a/include/linux/sunrpc/svcauth_gss.h b/include/linux/sunrpc/svcauth_gss.h index 7c32daa025eb..726aff1a5201 100644 --- a/include/linux/sunrpc/svcauth_gss.h +++ b/include/linux/sunrpc/svcauth_gss.h | |||
| @@ -22,7 +22,6 @@ int gss_svc_init_net(struct net *net); | |||
| 22 | void gss_svc_shutdown_net(struct net *net); | 22 | void gss_svc_shutdown_net(struct net *net); |
| 23 | int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name); | 23 | int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name); |
| 24 | u32 svcauth_gss_flavor(struct auth_domain *dom); | 24 | u32 svcauth_gss_flavor(struct auth_domain *dom); |
| 25 | char *svc_gss_principal(struct svc_rqst *); | ||
| 26 | 25 | ||
| 27 | #endif /* __KERNEL__ */ | 26 | #endif /* __KERNEL__ */ |
| 28 | #endif /* _LINUX_SUNRPC_SVCAUTH_GSS_H */ | 27 | #endif /* _LINUX_SUNRPC_SVCAUTH_GSS_H */ |
