summaryrefslogtreecommitdiff
path: root/sshconnect.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshconnect.c')
-rw-r--r--sshconnect.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sshconnect.c b/sshconnect.c
index e7354486b..96f823f93 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect.c,v 1.212 2008/10/14 18:11:33 stevesk Exp $ */ 1/* $OpenBSD: sshconnect.c,v 1.214 2009/05/28 16:50:16 andreas 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
@@ -56,6 +56,7 @@
56#include "atomicio.h" 56#include "atomicio.h"
57#include "misc.h" 57#include "misc.h"
58#include "dns.h" 58#include "dns.h"
59#include "roaming.h"
59#include "version.h" 60#include "version.h"
60 61
61char *client_version_string = NULL; 62char *client_version_string = NULL;
@@ -413,7 +414,7 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
413 * Waits for the server identification string, and sends our own 414 * Waits for the server identification string, and sends our own
414 * identification string. 415 * identification string.
415 */ 416 */
416static void 417void
417ssh_exchange_identification(int timeout_ms) 418ssh_exchange_identification(int timeout_ms)
418{ 419{
419 char buf[256], remote_version[256]; /* must be same size! */ 420 char buf[256], remote_version[256]; /* must be same size! */
@@ -452,7 +453,7 @@ ssh_exchange_identification(int timeout_ms)
452 } 453 }
453 } 454 }
454 455
455 len = atomicio(read, connection_in, &buf[i], 1); 456 len = roaming_atomicio(read, connection_in, &buf[i], 1);
456 457
457 if (len != 1 && errno == EPIPE) 458 if (len != 1 && errno == EPIPE)
458 fatal("ssh_exchange_identification: " 459 fatal("ssh_exchange_identification: "
@@ -537,7 +538,8 @@ ssh_exchange_identification(int timeout_ms)
537 compat20 ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1, 538 compat20 ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1,
538 compat20 ? PROTOCOL_MINOR_2 : minor1, 539 compat20 ? PROTOCOL_MINOR_2 : minor1,
539 SSH_RELEASE, compat20 ? "\r\n" : "\n"); 540 SSH_RELEASE, compat20 ? "\r\n" : "\n");
540 if (atomicio(vwrite, connection_out, buf, strlen(buf)) != strlen(buf)) 541 if (roaming_atomicio(vwrite, connection_out, buf, strlen(buf))
542 != strlen(buf))
541 fatal("write: %.100s", strerror(errno)); 543 fatal("write: %.100s", strerror(errno));
542 client_version_string = xstrdup(buf); 544 client_version_string = xstrdup(buf);
543 chop(client_version_string); 545 chop(client_version_string);