diff options
-rw-r--r-- | include/linux/sunrpc/gss_krb5.h | 12 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_mech.c | 28 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_seal.c | 5 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_unseal.c | 6 |
4 files changed, 10 insertions, 41 deletions
diff --git a/include/linux/sunrpc/gss_krb5.h b/include/linux/sunrpc/gss_krb5.h index a7bda4edb85..2c3601d3104 100644 --- a/include/linux/sunrpc/gss_krb5.h +++ b/include/linux/sunrpc/gss_krb5.h | |||
@@ -118,15 +118,11 @@ s32 | |||
118 | make_checksum(s32 cksumtype, char *header, int hdrlen, struct xdr_buf *body, | 118 | make_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 | ||
121 | u32 | 121 | u32 gss_get_mic_kerberos(struct gss_ctx *, struct xdr_buf *, |
122 | krb5_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 | ||
126 | u32 | 124 | u32 gss_verify_mic_kerberos(struct gss_ctx *, struct xdr_buf *, |
127 | krb5_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 | ||
131 | u32 | 127 | u32 |
132 | gss_wrap_kerberos(struct gss_ctx *ctx_id, int offset, | 128 | gss_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 9ffac2c50b9..5f1f806a0b1 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 | ||
193 | static u32 | ||
194 | gss_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 | |||
207 | static u32 | ||
208 | gss_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 | |||
221 | static struct gss_api_ops gss_kerberos_ops = { | 193 | static 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 15227c727c8..13f8ae97945 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 | ||
73 | u32 | 73 | u32 |
74 | krb5_make_token(struct krb5_ctx *ctx, | 74 | gss_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 bcf978627a7..2030475d98e 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 | ||
74 | u32 | 74 | u32 |
75 | krb5_read_token(struct krb5_ctx *ctx, | 75 | gss_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; |