summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2012-05-15 01:55:22 +0200
committerJ. Bruce Fields <bfields@redhat.com>2012-06-01 02:29:55 +0200
commit03a4e1f6ddf25f48848e1bddcffc0ad489648331 (patch)
treef140e3deb767d092eca997037ebb7b098d8afce9 /include
parentnfsd4: allow removing clients not holding state (diff)
downloadlinux-03a4e1f6ddf25f48848e1bddcffc0ad489648331.tar.xz
linux-03a4e1f6ddf25f48848e1bddcffc0ad489648331.zip
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')
-rw-r--r--include/linux/sunrpc/svcauth.h9
-rw-r--r--include/linux/sunrpc/svcauth_gss.h1
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 @@
#include <linux/sunrpc/msg_prot.h>
#include <linux/sunrpc/cache.h>
#include <linux/hash.h>
+#include <linux/cred.h>
struct svc_cred {
uid_t cr_uid;
gid_t cr_gid;
struct group_info *cr_group_info;
+ char *cr_principal; /* for gss */
};
+static inline void free_svc_cred(struct svc_cred *cred)
+{
+ if (cred->cr_group_info)
+ put_group_info(cred->cr_group_info);
+ kfree(cred->cr_principal);
+}
+
struct svc_rqst; /* forward decl */
struct in6_addr;
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);
void gss_svc_shutdown_net(struct net *net);
int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name);
u32 svcauth_gss_flavor(struct auth_domain *dom);
-char *svc_gss_principal(struct svc_rqst *);
#endif /* __KERNEL__ */
#endif /* _LINUX_SUNRPC_SVCAUTH_GSS_H */