summaryrefslogtreecommitdiff
path: root/sshconnect.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2009-06-21 18:53:53 +1000
committerDarren Tucker <dtucker@zip.com.au>2009-06-21 18:53:53 +1000
commitc5564e1c4c41ae9af96973e2996e2a4285acbae8 (patch)
treef9fae51c40975704cc73af6073914b00821e3009 /sshconnect.c
parent1cc55d7a607455d75db0204b5acebce47667b0f8 (diff)
- andreas@cvs.openbsd.org 2009/05/28 16:50:16
[sshd.c packet.c serverloop.c monitor_wrap.c clientloop.c sshconnect.c monitor.c Added roaming.h roaming_common.c roaming_dummy.c] Keep track of number of bytes read and written. Needed for upcoming changes. Most code from Martin Forssen, maf at appgate dot com. ok markus@ Also, applied appropriate changes to Makefile.in
Diffstat (limited to 'sshconnect.c')
-rw-r--r--sshconnect.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sshconnect.c b/sshconnect.c
index dee3ba544..3e57e859d 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect.c,v 1.213 2009/05/27 06:38:16 andreas 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;
@@ -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_VERSION, compat20 ? "\r\n" : "\n"); 540 SSH_VERSION, 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);