History

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.

J. Bruce Fields committed 14 years ago

Commit 03a4e1f1 parent 631fc9e8 files · +38 −41Browse files

Showing the changes to include (2 of 8 files). Show all

Unified · Split

2 files
  1. include/linux/sunrpc/svcauth.h +9 −0
  2. include/linux/sunrpc/svcauth_gss.h +0 −1
include/linux/sunrpc/svcauth.h+9−0
@@ -15,13 +15,22 @@ · 14 unmodified lines
1515 #include <linux/sunrpc/msg_prot.h>
1616 #include <linux/sunrpc/cache.h>
1717 #include <linux/hash.h>
18+#include <linux/cred.h>
1819
1920 struct svc_cred {
2021 uid_t cr_uid;
2122 gid_t cr_gid;
2223 struct group_info *cr_group_info;
24+ char *cr_principal; /* for gss */
2325 };
2426
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+
2534 struct svc_rqst; /* forward decl */
2635 struct in6_addr;
2736
include/linux/sunrpc/svcauth_gss.h+0−1
@@ -22,7 +22,6 @@ int gss_svc_init_net(struct net *net); · 21 unmodified lines
2222 void gss_svc_shutdown_net(struct net *net);
2323 int svcauth_gss_register_pseudoflavor(u32 pseudoflavor, char * name);
2424 u32 svcauth_gss_flavor(struct auth_domain *dom);
25−char *svc_gss_principal(struct svc_rqst *);
2625
2726 #endif /* __KERNEL__ */
2827 #endif /* _LINUX_SUNRPC_SVCAUTH_GSS_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t