diff options
Diffstat (limited to 'auth-krb4.c')
-rw-r--r-- | auth-krb4.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/auth-krb4.c b/auth-krb4.c index 1cc528aa0..b86ce7e49 100644 --- a/auth-krb4.c +++ b/auth-krb4.c | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: auth-krb4.c,v 1.27 2002/06/11 05:46:20 mpech Exp $"); | 26 | RCSID("$OpenBSD: auth-krb4.c,v 1.28 2002/09/26 11:38:43 markus Exp $"); |
27 | 27 | ||
28 | #include "ssh.h" | 28 | #include "ssh.h" |
29 | #include "ssh1.h" | 29 | #include "ssh1.h" |
@@ -210,10 +210,9 @@ krb4_cleanup_proc(void *context) | |||
210 | } | 210 | } |
211 | 211 | ||
212 | int | 212 | int |
213 | auth_krb4(Authctxt *authctxt, KTEXT auth, char **client) | 213 | auth_krb4(Authctxt *authctxt, KTEXT auth, char **client, KTEXT reply) |
214 | { | 214 | { |
215 | AUTH_DAT adat = {0}; | 215 | AUTH_DAT adat = {0}; |
216 | KTEXT_ST reply; | ||
217 | Key_schedule schedule; | 216 | Key_schedule schedule; |
218 | struct sockaddr_in local, foreign; | 217 | struct sockaddr_in local, foreign; |
219 | char instance[INST_SZ]; | 218 | char instance[INST_SZ]; |
@@ -263,21 +262,16 @@ auth_krb4(Authctxt *authctxt, KTEXT auth, char **client) | |||
263 | 262 | ||
264 | /* If we can't successfully encrypt the checksum, we send back an | 263 | /* If we can't successfully encrypt the checksum, we send back an |
265 | empty message, admitting our failure. */ | 264 | empty message, admitting our failure. */ |
266 | if ((r = krb_mk_priv((u_char *) & cksum, reply.dat, sizeof(cksum) + 1, | 265 | if ((r = krb_mk_priv((u_char *) & cksum, reply->dat, sizeof(cksum) + 1, |
267 | schedule, &adat.session, &local, &foreign)) < 0) { | 266 | schedule, &adat.session, &local, &foreign)) < 0) { |
268 | debug("Kerberos v4 mk_priv: (%d) %s", r, krb_err_txt[r]); | 267 | debug("Kerberos v4 mk_priv: (%d) %s", r, krb_err_txt[r]); |
269 | reply.dat[0] = 0; | 268 | reply->dat[0] = 0; |
270 | reply.length = 0; | 269 | reply->length = 0; |
271 | } else | 270 | } else |
272 | reply.length = r; | 271 | reply->length = r; |
273 | 272 | ||
274 | /* Clear session key. */ | 273 | /* Clear session key. */ |
275 | memset(&adat.session, 0, sizeof(&adat.session)); | 274 | memset(&adat.session, 0, sizeof(&adat.session)); |
276 | |||
277 | packet_start(SSH_SMSG_AUTH_KERBEROS_RESPONSE); | ||
278 | packet_put_string((char *) reply.dat, reply.length); | ||
279 | packet_send(); | ||
280 | packet_write_wait(); | ||
281 | return (1); | 275 | return (1); |
282 | } | 276 | } |
283 | #endif /* KRB4 */ | 277 | #endif /* KRB4 */ |