diff options
Diffstat (limited to 'authfd.c')
-rw-r--r-- | authfd.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: authfd.c,v 1.61 2003/06/28 16:23:06 deraadt Exp $"); | 38 | RCSID("$OpenBSD: authfd.c,v 1.63 2003/11/21 11:57:03 djm Exp $"); |
39 | 39 | ||
40 | #include <openssl/evp.h> | 40 | #include <openssl/evp.h> |
41 | 41 | ||
@@ -114,7 +114,8 @@ ssh_get_authentication_socket(void) | |||
114 | static int | 114 | static int |
115 | ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply) | 115 | ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply) |
116 | { | 116 | { |
117 | int l, len; | 117 | int l; |
118 | u_int len; | ||
118 | char buf[1024]; | 119 | char buf[1024]; |
119 | 120 | ||
120 | /* Get the length of the message, and format it in the buffer. */ | 121 | /* Get the length of the message, and format it in the buffer. */ |
@@ -147,7 +148,7 @@ ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply | |||
147 | /* Extract the length, and check it for sanity. */ | 148 | /* Extract the length, and check it for sanity. */ |
148 | len = GET_32BIT(buf); | 149 | len = GET_32BIT(buf); |
149 | if (len > 256 * 1024) | 150 | if (len > 256 * 1024) |
150 | fatal("Authentication response too long: %d", len); | 151 | fatal("Authentication response too long: %u", len); |
151 | 152 | ||
152 | /* Read the rest of the response in to the buffer. */ | 153 | /* Read the rest of the response in to the buffer. */ |
153 | buffer_clear(reply); | 154 | buffer_clear(reply); |
@@ -292,7 +293,7 @@ ssh_get_num_identities(AuthenticationConnection *auth, int version) | |||
292 | 293 | ||
293 | /* Get the number of entries in the response and check it for sanity. */ | 294 | /* Get the number of entries in the response and check it for sanity. */ |
294 | auth->howmany = buffer_get_int(&auth->identities); | 295 | auth->howmany = buffer_get_int(&auth->identities); |
295 | if (auth->howmany > 1024) | 296 | if ((u_int)auth->howmany > 1024) |
296 | fatal("Too many identities in authentication reply: %d", | 297 | fatal("Too many identities in authentication reply: %d", |
297 | auth->howmany); | 298 | auth->howmany); |
298 | 299 | ||
@@ -589,7 +590,7 @@ ssh_remove_identity(AuthenticationConnection *auth, Key *key) | |||
589 | } | 590 | } |
590 | 591 | ||
591 | int | 592 | int |
592 | ssh_update_card(AuthenticationConnection *auth, int add, | 593 | ssh_update_card(AuthenticationConnection *auth, int add, |
593 | const char *reader_id, const char *pin, u_int life, u_int confirm) | 594 | const char *reader_id, const char *pin, u_int life, u_int confirm) |
594 | { | 595 | { |
595 | Buffer msg; | 596 | Buffer msg; |
@@ -606,7 +607,7 @@ ssh_update_card(AuthenticationConnection *auth, int add, | |||
606 | buffer_put_char(&msg, type); | 607 | buffer_put_char(&msg, type); |
607 | buffer_put_cstring(&msg, reader_id); | 608 | buffer_put_cstring(&msg, reader_id); |
608 | buffer_put_cstring(&msg, pin); | 609 | buffer_put_cstring(&msg, pin); |
609 | 610 | ||
610 | if (constrained) { | 611 | if (constrained) { |
611 | if (life != 0) { | 612 | if (life != 0) { |
612 | buffer_put_char(&msg, SSH_AGENT_CONSTRAIN_LIFETIME); | 613 | buffer_put_char(&msg, SSH_AGENT_CONSTRAIN_LIFETIME); |