diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-26 19:23:04 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-30 09:19:36 -0400 |
commit | c2190661039b3817b4cc1cbfea620b3f7dbe5cd8 (patch) | |
tree | 61b8f6f287993f604c3a7843aa2322c36f375af9 /include/linux/sunrpc | |
parent | bd4a3eb15bb42296e61d0fd16f2c7f8cc171b681 (diff) |
SUNRPC: Replace clnt->cl_principal
The clnt->cl_principal is being used exclusively to store the service
target name for RPCSEC_GSS/krb5 callbacks. Replace it with something that
is stored only in the RPCSEC_GSS-specific code.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/auth.h | 10 | ||||
-rw-r--r-- | include/linux/sunrpc/clnt.h | 1 |
2 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h index 0dd00f4f6810..a9ab577b0c4a 100644 --- a/include/linux/sunrpc/auth.h +++ b/include/linux/sunrpc/auth.h | |||
@@ -87,6 +87,11 @@ struct rpc_auth { | |||
87 | /* per-flavor data */ | 87 | /* per-flavor data */ |
88 | }; | 88 | }; |
89 | 89 | ||
90 | struct rpc_auth_create_args { | ||
91 | rpc_authflavor_t pseudoflavor; | ||
92 | const char *target_name; | ||
93 | }; | ||
94 | |||
90 | /* Flags for rpcauth_lookupcred() */ | 95 | /* Flags for rpcauth_lookupcred() */ |
91 | #define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */ | 96 | #define RPCAUTH_LOOKUP_NEW 0x01 /* Accept an uninitialised cred */ |
92 | 97 | ||
@@ -97,7 +102,7 @@ struct rpc_authops { | |||
97 | struct module *owner; | 102 | struct module *owner; |
98 | rpc_authflavor_t au_flavor; /* flavor (RPC_AUTH_*) */ | 103 | rpc_authflavor_t au_flavor; /* flavor (RPC_AUTH_*) */ |
99 | char * au_name; | 104 | char * au_name; |
100 | struct rpc_auth * (*create)(struct rpc_clnt *, rpc_authflavor_t); | 105 | struct rpc_auth * (*create)(struct rpc_auth_create_args *, struct rpc_clnt *); |
101 | void (*destroy)(struct rpc_auth *); | 106 | void (*destroy)(struct rpc_auth *); |
102 | 107 | ||
103 | struct rpc_cred * (*lookup_cred)(struct rpc_auth *, struct auth_cred *, int); | 108 | struct rpc_cred * (*lookup_cred)(struct rpc_auth *, struct auth_cred *, int); |
@@ -140,7 +145,8 @@ struct rpc_cred * rpc_lookup_cred(void); | |||
140 | struct rpc_cred * rpc_lookup_machine_cred(const char *service_name); | 145 | struct rpc_cred * rpc_lookup_machine_cred(const char *service_name); |
141 | int rpcauth_register(const struct rpc_authops *); | 146 | int rpcauth_register(const struct rpc_authops *); |
142 | int rpcauth_unregister(const struct rpc_authops *); | 147 | int rpcauth_unregister(const struct rpc_authops *); |
143 | struct rpc_auth * rpcauth_create(rpc_authflavor_t, struct rpc_clnt *); | 148 | struct rpc_auth * rpcauth_create(struct rpc_auth_create_args *, |
149 | struct rpc_clnt *); | ||
144 | void rpcauth_release(struct rpc_auth *); | 150 | void rpcauth_release(struct rpc_auth *); |
145 | rpc_authflavor_t rpcauth_get_pseudoflavor(rpc_authflavor_t, | 151 | rpc_authflavor_t rpcauth_get_pseudoflavor(rpc_authflavor_t, |
146 | struct rpcsec_gss_info *); | 152 | struct rpcsec_gss_info *); |
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 481f9c07631e..b93b4aa49ffd 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -60,7 +60,6 @@ struct rpc_clnt { | |||
60 | struct rpc_rtt cl_rtt_default; | 60 | struct rpc_rtt cl_rtt_default; |
61 | struct rpc_timeout cl_timeout_default; | 61 | struct rpc_timeout cl_timeout_default; |
62 | const struct rpc_program *cl_program; | 62 | const struct rpc_program *cl_program; |
63 | char *cl_principal; /* target to authenticate to */ | ||
64 | }; | 63 | }; |
65 | 64 | ||
66 | /* | 65 | /* |