summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-08-07 00:43:50 +0200
committerBen Lindstrom <mouring@eviladmin.org>2001-08-07 00:43:50 +0200
commitde8fc6fadc2039747482f17bf4d32c505d0f0383 (patch)
tree6cfbef671328cec833241045972ae7f4c409590b
parent - markus@cvs.openbsd.org 2001/08/05 23:18:20 (diff)
downloadopenssh-de8fc6fadc2039747482f17bf4d32c505d0f0383.tar.xz
openssh-de8fc6fadc2039747482f17bf4d32c505d0f0383.zip
- markus@cvs.openbsd.org 2001/08/05 23:29:58
[ssh-keyscan.c] make -t dsa work with commercial servers, too
-rw-r--r--ChangeLog5
-rw-r--r--ssh-keyscan.c9
2 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 6ebbabc04..07a601528 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -141,6 +141,9 @@
- markus@cvs.openbsd.org 2001/08/05 23:18:20
[ssh-keyscan.1 ssh-keyscan.c]
ssh 2 support; from wayned@users.sourceforge.net
+ - markus@cvs.openbsd.org 2001/08/05 23:29:58
+ [ssh-keyscan.c]
+ make -t dsa work with commercial servers, too
20010803
- (djm) Fix interrupted read in entropy gatherer. Spotted by markus@ on
@@ -6251,4 +6254,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.1463 2001/08/06 22:41:30 mouring Exp $
+$Id: ChangeLog,v 1.1464 2001/08/06 22:43:50 mouring Exp $
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index 5a992515e..3f8c5b403 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -7,7 +7,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-keyscan.c,v 1.26 2001/08/05 23:18:20 markus Exp $");
+RCSID("$OpenBSD: ssh-keyscan.c,v 1.27 2001/08/05 23:29:58 markus Exp $");
#if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H)
#include <sys/queue.h>
@@ -499,8 +499,11 @@ congreet(int s)
bufsiz = sizeof(buf);
cp = buf;
- while (bufsiz-- && (n = read(s, cp, 1)) == 1 && *cp != '\n' && *cp != '\r')
+ while (bufsiz-- && (n = read(s, cp, 1)) == 1 && *cp != '\n') {
+ if (*cp == '\r')
+ *cp = '\n';
cp++;
+ }
if (n < 0) {
if (errno != ECONNREFUSED)
error("read (%s): %s", c->c_name, strerror(errno));
@@ -513,7 +516,6 @@ congreet(int s)
return;
}
*cp = '\0';
- fprintf(stderr, "# %s %s\n", c->c_name, buf);
if (c->c_keytype != KT_RSA1) {
int remote_major, remote_minor;
char remote_version[sizeof buf];
@@ -529,6 +531,7 @@ congreet(int s)
return;
}
}
+ fprintf(stderr, "# %s %s\n", c->c_name, chop(buf));
n = snprintf(buf, sizeof buf, "SSH-%d.%d-OpenSSH-keyscan\r\n",
c->c_keytype == KT_RSA1? PROTOCOL_MAJOR_1 : PROTOCOL_MAJOR_2,
c->c_keytype == KT_RSA1? PROTOCOL_MINOR_1 : PROTOCOL_MINOR_2);