aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@fieldses.org>2005-10-13 16:55:23 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-10-19 02:19:47 -0400
commita0857d03b21fa54653c9d2fe7a315381176015b4 (patch)
treeac7fcc4415795b9d4530de300ef555cd624727d8
parent00fd6e14255fe7a249315746386d640bc4e9e758 (diff)
RPCSEC_GSS: krb5 cleanup
Remove some senseless wrappers. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r--include/linux/sunrpc/gss_krb5.h12
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_mech.c28
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_seal.c5
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_unseal.c6
4 files changed, 10 insertions, 41 deletions
diff --git a/include/linux/sunrpc/gss_krb5.h b/include/linux/sunrpc/gss_krb5.h
index a7bda4edb853..2c3601d31045 100644
--- a/include/linux/sunrpc/gss_krb5.h
+++ b/include/linux/sunrpc/gss_krb5.h
@@ -118,15 +118,11 @@ s32
118make_checksum(s32 cksumtype, char *header, int hdrlen, struct xdr_buf *body, 118make_checksum(s32 cksumtype, char *header, int hdrlen, struct xdr_buf *body,
119 int body_offset, struct xdr_netobj *cksum); 119 int body_offset, struct xdr_netobj *cksum);
120 120
121u32 121u32 gss_get_mic_kerberos(struct gss_ctx *, struct xdr_buf *,
122krb5_make_token(struct krb5_ctx *context_handle, 122 struct xdr_netobj *);
123 struct xdr_buf *input_message_buffer,
124 struct xdr_netobj *output_message_buffer);
125 123
126u32 124u32 gss_verify_mic_kerberos(struct gss_ctx *, struct xdr_buf *,
127krb5_read_token(struct krb5_ctx *context_handle, 125 struct xdr_netobj *);
128 struct xdr_netobj *input_token_buffer,
129 struct xdr_buf *message_buffer);
130 126
131u32 127u32
132gss_wrap_kerberos(struct gss_ctx *ctx_id, int offset, 128gss_wrap_kerberos(struct gss_ctx *ctx_id, int offset,
diff --git a/net/sunrpc/auth_gss/gss_krb5_mech.c b/net/sunrpc/auth_gss/gss_krb5_mech.c
index 9ffac2c50b94..5f1f806a0b11 100644
--- a/net/sunrpc/auth_gss/gss_krb5_mech.c
+++ b/net/sunrpc/auth_gss/gss_krb5_mech.c
@@ -190,34 +190,6 @@ gss_delete_sec_context_kerberos(void *internal_ctx) {
190 kfree(kctx); 190 kfree(kctx);
191} 191}
192 192
193static u32
194gss_verify_mic_kerberos(struct gss_ctx *ctx,
195 struct xdr_buf *message,
196 struct xdr_netobj *mic_token)
197{
198 u32 maj_stat = 0;
199 struct krb5_ctx *kctx = ctx->internal_ctx_id;
200
201 maj_stat = krb5_read_token(kctx, mic_token, message);
202
203 dprintk("RPC: gss_verify_mic_kerberos returning %d\n", maj_stat);
204 return maj_stat;
205}
206
207static u32
208gss_get_mic_kerberos(struct gss_ctx *ctx,
209 struct xdr_buf *message,
210 struct xdr_netobj *mic_token) {
211 u32 err = 0;
212 struct krb5_ctx *kctx = ctx->internal_ctx_id;
213
214 err = krb5_make_token(kctx, message, mic_token);
215
216 dprintk("RPC: gss_get_mic_kerberos returning %d\n",err);
217
218 return err;
219}
220
221static struct gss_api_ops gss_kerberos_ops = { 193static struct gss_api_ops gss_kerberos_ops = {
222 .gss_import_sec_context = gss_import_sec_context_kerberos, 194 .gss_import_sec_context = gss_import_sec_context_kerberos,
223 .gss_get_mic = gss_get_mic_kerberos, 195 .gss_get_mic = gss_get_mic_kerberos,
diff --git a/net/sunrpc/auth_gss/gss_krb5_seal.c b/net/sunrpc/auth_gss/gss_krb5_seal.c
index 15227c727c8b..13f8ae979454 100644
--- a/net/sunrpc/auth_gss/gss_krb5_seal.c
+++ b/net/sunrpc/auth_gss/gss_krb5_seal.c
@@ -71,9 +71,10 @@
71#endif 71#endif
72 72
73u32 73u32
74krb5_make_token(struct krb5_ctx *ctx, 74gss_get_mic_kerberos(struct gss_ctx *gss_ctx, struct xdr_buf *text,
75 struct xdr_buf *text, struct xdr_netobj *token) 75 struct xdr_netobj *token)
76{ 76{
77 struct krb5_ctx *ctx = gss_ctx->internal_ctx_id;
77 s32 checksum_type; 78 s32 checksum_type;
78 struct xdr_netobj md5cksum = {.len = 0, .data = NULL}; 79 struct xdr_netobj md5cksum = {.len = 0, .data = NULL};
79 unsigned char *ptr, *krb5_hdr, *msg_start; 80 unsigned char *ptr, *krb5_hdr, *msg_start;
diff --git a/net/sunrpc/auth_gss/gss_krb5_unseal.c b/net/sunrpc/auth_gss/gss_krb5_unseal.c
index bcf978627a71..2030475d98ed 100644
--- a/net/sunrpc/auth_gss/gss_krb5_unseal.c
+++ b/net/sunrpc/auth_gss/gss_krb5_unseal.c
@@ -72,10 +72,10 @@
72 * supposedly taken over. */ 72 * supposedly taken over. */
73 73
74u32 74u32
75krb5_read_token(struct krb5_ctx *ctx, 75gss_verify_mic_kerberos(struct gss_ctx *gss_ctx,
76 struct xdr_netobj *read_token, 76 struct xdr_buf *message_buffer, struct xdr_netobj *read_token)
77 struct xdr_buf *message_buffer)
78{ 77{
78 struct krb5_ctx *ctx = gss_ctx->internal_ctx_id;
79 int signalg; 79 int signalg;
80 int sealalg; 80 int sealalg;
81 s32 checksum_type; 81 s32 checksum_type;