diff options
Diffstat (limited to 'include/linux/sunrpc/svcauth.h')
| -rw-r--r-- | include/linux/sunrpc/svcauth.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index 548790e9113b..dd74084a9799 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
| @@ -15,14 +15,23 @@ | |||
| 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 | #define SVC_CRED_NGROUPS 32 | ||
| 20 | struct svc_cred { | 20 | struct svc_cred { |
| 21 | uid_t cr_uid; | 21 | uid_t cr_uid; |
| 22 | gid_t cr_gid; | 22 | gid_t cr_gid; |
| 23 | struct group_info *cr_group_info; | 23 | struct group_info *cr_group_info; |
| 24 | u32 cr_flavor; /* pseudoflavor */ | ||
| 25 | char *cr_principal; /* for gss */ | ||
| 24 | }; | 26 | }; |
| 25 | 27 | ||
| 28 | static inline void free_svc_cred(struct svc_cred *cred) | ||
| 29 | { | ||
| 30 | if (cred->cr_group_info) | ||
| 31 | put_group_info(cred->cr_group_info); | ||
| 32 | kfree(cred->cr_principal); | ||
| 33 | } | ||
| 34 | |||
| 26 | struct svc_rqst; /* forward decl */ | 35 | struct svc_rqst; /* forward decl */ |
| 27 | struct in6_addr; | 36 | struct in6_addr; |
| 28 | 37 | ||
| @@ -131,7 +140,7 @@ extern struct auth_domain *auth_domain_lookup(char *name, struct auth_domain *ne | |||
| 131 | extern struct auth_domain *auth_domain_find(char *name); | 140 | extern struct auth_domain *auth_domain_find(char *name); |
| 132 | extern struct auth_domain *auth_unix_lookup(struct net *net, struct in6_addr *addr); | 141 | extern struct auth_domain *auth_unix_lookup(struct net *net, struct in6_addr *addr); |
| 133 | extern int auth_unix_forget_old(struct auth_domain *dom); | 142 | extern int auth_unix_forget_old(struct auth_domain *dom); |
| 134 | extern void svcauth_unix_purge(void); | 143 | extern void svcauth_unix_purge(struct net *net); |
| 135 | extern void svcauth_unix_info_release(struct svc_xprt *xpt); | 144 | extern void svcauth_unix_info_release(struct svc_xprt *xpt); |
| 136 | extern int svcauth_unix_set_client(struct svc_rqst *rqstp); | 145 | extern int svcauth_unix_set_client(struct svc_rqst *rqstp); |
| 137 | 146 | ||
