summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c8
1 files changed, 5 insertions, 3 deletions
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. */