summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--sshconnect.c6
-rw-r--r--sshd.c8
3 files changed, 13 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index d7a516fa1..8cfce1fdd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,10 @@
17 [sshconnect.c] 17 [sshconnect.c]
18 Check ExitOnForwardFailure if forwardings are disabled due to a failed 18 Check ExitOnForwardFailure if forwardings are disabled due to a failed
19 host key check. ok djm@ 19 host key check. ok djm@
20 - dtucker@cvs.openbsd.org 2008/07/01 07:24:22
21 [sshconnect.c sshd.c]
22 Send CR LF during protocol banner exchanges, but only for Protocol 2 only,
23 in order to comply with RFC 4253. bz #1443, ok djm@
20 24
2120080630 2520080630
22 - (djm) OpenBSD CVS Sync 26 - (djm) OpenBSD CVS Sync
@@ -4500,4 +4504,4 @@
4500 OpenServer 6 and add osr5bigcrypt support so when someone migrates 4504 OpenServer 6 and add osr5bigcrypt support so when someone migrates
4501 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 4505 passwords between UnixWare and OpenServer they will still work. OK dtucker@
4502 4506
4503$Id: ChangeLog,v 1.5043 2008/07/02 12:33:55 dtucker Exp $ 4507$Id: ChangeLog,v 1.5044 2008/07/02 12:34:30 dtucker Exp $
diff --git a/sshconnect.c b/sshconnect.c
index 8c5f66dd5..ec8ba33e0 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect.c,v 1.210 2008/07/01 07:20:52 dtucker Exp $ */ 1/* $OpenBSD: sshconnect.c,v 1.211 2008/07/01 07:24:22 dtucker 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
@@ -537,10 +537,10 @@ ssh_exchange_identification(int timeout_ms)
537 (options.protocol & SSH_PROTO_2) ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1, 537 (options.protocol & SSH_PROTO_2) ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1,
538 remote_major); 538 remote_major);
539 /* Send our own protocol version identification. */ 539 /* Send our own protocol version identification. */
540 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", 540 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s",
541 compat20 ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1, 541 compat20 ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1,
542 compat20 ? PROTOCOL_MINOR_2 : minor1, 542 compat20 ? PROTOCOL_MINOR_2 : minor1,
543 SSH_VERSION); 543 SSH_VERSION, compat20 ? "\r\n" : "\n");
544 if (atomicio(vwrite, connection_out, buf, strlen(buf)) != strlen(buf)) 544 if (atomicio(vwrite, connection_out, buf, strlen(buf)) != strlen(buf))
545 fatal("write: %.100s", strerror(errno)); 545 fatal("write: %.100s", strerror(errno));
546 client_version_string = xstrdup(buf); 546 client_version_string = xstrdup(buf);
diff --git a/sshd.c b/sshd.c
index 8ebbbee7b..c952f7ad2 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.362 2008/06/14 17:07:11 dtucker Exp $ */ 1/* $OpenBSD: sshd.c,v 1.363 2008/07/01 07:24:22 dtucker 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
@@ -399,7 +399,7 @@ sshd_exchange_identification(int sock_in, int sock_out)
399 int mismatch; 399 int mismatch;
400 int remote_major, remote_minor; 400 int remote_major, remote_minor;
401 int major, minor; 401 int major, minor;
402 char *s; 402 char *s, *newline = "\n";
403 char buf[256]; /* Must not be larger than remote_version. */ 403 char buf[256]; /* Must not be larger than remote_version. */
404 char remote_version[256]; /* Must be at least as big as buf. */ 404 char remote_version[256]; /* Must be at least as big as buf. */
405 405
@@ -410,11 +410,13 @@ sshd_exchange_identification(int sock_in, int sock_out)
410 } else if (options.protocol & SSH_PROTO_2) { 410 } else if (options.protocol & SSH_PROTO_2) {
411 major = PROTOCOL_MAJOR_2; 411 major = PROTOCOL_MAJOR_2;
412 minor = PROTOCOL_MINOR_2; 412 minor = PROTOCOL_MINOR_2;
413 newline = "\r\n";
413 } else { 414 } else {
414 major = PROTOCOL_MAJOR_1; 415 major = PROTOCOL_MAJOR_1;
415 minor = PROTOCOL_MINOR_1; 416 minor = PROTOCOL_MINOR_1;
416 } 417 }
417 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", major, minor, SSH_VERSION); 418 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", major, minor,
419 SSH_VERSION, newline);
418 server_version_string = xstrdup(buf); 420 server_version_string = xstrdup(buf);
419 421
420 /* Send our protocol version identification. */ 422 /* Send our protocol version identification. */