diff options
author | Colin Watson <cjwatson@debian.org> | 2013-09-14 15:43:03 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2013-09-14 15:43:03 +0100 |
commit | 8faf8c84430cf3c19705b1d9f8889d256e7fd1fd (patch) | |
tree | e6cb74192adb00fda5e4d1457547851d7e0d86af /sshconnect1.c | |
parent | 328b60656f29db6306994d7498dede386ec2d1c3 (diff) | |
parent | c41345ad7ee5a22689e2c009595e85fa27b4b39a (diff) |
merge 6.3p1
Diffstat (limited to 'sshconnect1.c')
-rw-r--r-- | sshconnect1.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sshconnect1.c b/sshconnect1.c index fd07bbf74..d285e23c0 100644 --- a/sshconnect1.c +++ b/sshconnect1.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sshconnect1.c,v 1.70 2006/11/06 21:25:28 markus Exp $ */ | 1 | /* $OpenBSD: sshconnect1.c,v 1.71 2013/05/17 00:13:14 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -84,7 +84,7 @@ try_agent_authentication(void) | |||
84 | 84 | ||
85 | /* Try this identity. */ | 85 | /* Try this identity. */ |
86 | debug("Trying RSA authentication via agent with '%.100s'", comment); | 86 | debug("Trying RSA authentication via agent with '%.100s'", comment); |
87 | xfree(comment); | 87 | free(comment); |
88 | 88 | ||
89 | /* Tell the server that we are willing to authenticate using this key. */ | 89 | /* Tell the server that we are willing to authenticate using this key. */ |
90 | packet_start(SSH_CMSG_AUTH_RSA); | 90 | packet_start(SSH_CMSG_AUTH_RSA); |
@@ -231,7 +231,7 @@ try_rsa_authentication(int idx) | |||
231 | */ | 231 | */ |
232 | if (type == SSH_SMSG_FAILURE) { | 232 | if (type == SSH_SMSG_FAILURE) { |
233 | debug("Server refused our key."); | 233 | debug("Server refused our key."); |
234 | xfree(comment); | 234 | free(comment); |
235 | return 0; | 235 | return 0; |
236 | } | 236 | } |
237 | /* Otherwise, the server should respond with a challenge. */ | 237 | /* Otherwise, the server should respond with a challenge. */ |
@@ -270,14 +270,14 @@ try_rsa_authentication(int idx) | |||
270 | quit = 1; | 270 | quit = 1; |
271 | } | 271 | } |
272 | memset(passphrase, 0, strlen(passphrase)); | 272 | memset(passphrase, 0, strlen(passphrase)); |
273 | xfree(passphrase); | 273 | free(passphrase); |
274 | if (private != NULL || quit) | 274 | if (private != NULL || quit) |
275 | break; | 275 | break; |
276 | debug2("bad passphrase given, try again..."); | 276 | debug2("bad passphrase given, try again..."); |
277 | } | 277 | } |
278 | } | 278 | } |
279 | /* We no longer need the comment. */ | 279 | /* We no longer need the comment. */ |
280 | xfree(comment); | 280 | free(comment); |
281 | 281 | ||
282 | if (private == NULL) { | 282 | if (private == NULL) { |
283 | if (!options.batch_mode && perm_ok) | 283 | if (!options.batch_mode && perm_ok) |
@@ -412,7 +412,7 @@ try_challenge_response_authentication(void) | |||
412 | packet_check_eom(); | 412 | packet_check_eom(); |
413 | snprintf(prompt, sizeof prompt, "%s%s", challenge, | 413 | snprintf(prompt, sizeof prompt, "%s%s", challenge, |
414 | strchr(challenge, '\n') ? "" : "\nResponse: "); | 414 | strchr(challenge, '\n') ? "" : "\nResponse: "); |
415 | xfree(challenge); | 415 | free(challenge); |
416 | if (i != 0) | 416 | if (i != 0) |
417 | error("Permission denied, please try again."); | 417 | error("Permission denied, please try again."); |
418 | if (options.cipher == SSH_CIPHER_NONE) | 418 | if (options.cipher == SSH_CIPHER_NONE) |
@@ -420,13 +420,13 @@ try_challenge_response_authentication(void) | |||
420 | "Response will be transmitted in clear text."); | 420 | "Response will be transmitted in clear text."); |
421 | response = read_passphrase(prompt, 0); | 421 | response = read_passphrase(prompt, 0); |
422 | if (strcmp(response, "") == 0) { | 422 | if (strcmp(response, "") == 0) { |
423 | xfree(response); | 423 | free(response); |
424 | break; | 424 | break; |
425 | } | 425 | } |
426 | packet_start(SSH_CMSG_AUTH_TIS_RESPONSE); | 426 | packet_start(SSH_CMSG_AUTH_TIS_RESPONSE); |
427 | ssh_put_password(response); | 427 | ssh_put_password(response); |
428 | memset(response, 0, strlen(response)); | 428 | memset(response, 0, strlen(response)); |
429 | xfree(response); | 429 | free(response); |
430 | packet_send(); | 430 | packet_send(); |
431 | packet_write_wait(); | 431 | packet_write_wait(); |
432 | type = packet_read(); | 432 | type = packet_read(); |
@@ -459,7 +459,7 @@ try_password_authentication(char *prompt) | |||
459 | packet_start(SSH_CMSG_AUTH_PASSWORD); | 459 | packet_start(SSH_CMSG_AUTH_PASSWORD); |
460 | ssh_put_password(password); | 460 | ssh_put_password(password); |
461 | memset(password, 0, strlen(password)); | 461 | memset(password, 0, strlen(password)); |
462 | xfree(password); | 462 | free(password); |
463 | packet_send(); | 463 | packet_send(); |
464 | packet_write_wait(); | 464 | packet_write_wait(); |
465 | 465 | ||