diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-08-06 22:43:50 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-08-06 22:43:50 +0000 |
commit | de8fc6fadc2039747482f17bf4d32c505d0f0383 (patch) | |
tree | 6cfbef671328cec833241045972ae7f4c409590b | |
parent | 325e70c90f3896eff8df5676b500532ec8407789 (diff) |
- markus@cvs.openbsd.org 2001/08/05 23:29:58
[ssh-keyscan.c]
make -t dsa work with commercial servers, too
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ssh-keyscan.c | 9 |
2 files changed, 10 insertions, 4 deletions
@@ -141,6 +141,9 @@ | |||
141 | - markus@cvs.openbsd.org 2001/08/05 23:18:20 | 141 | - markus@cvs.openbsd.org 2001/08/05 23:18:20 |
142 | [ssh-keyscan.1 ssh-keyscan.c] | 142 | [ssh-keyscan.1 ssh-keyscan.c] |
143 | ssh 2 support; from wayned@users.sourceforge.net | 143 | ssh 2 support; from wayned@users.sourceforge.net |
144 | - markus@cvs.openbsd.org 2001/08/05 23:29:58 | ||
145 | [ssh-keyscan.c] | ||
146 | make -t dsa work with commercial servers, too | ||
144 | 147 | ||
145 | 20010803 | 148 | 20010803 |
146 | - (djm) Fix interrupted read in entropy gatherer. Spotted by markus@ on | 149 | - (djm) Fix interrupted read in entropy gatherer. Spotted by markus@ on |
@@ -6251,4 +6254,4 @@ | |||
6251 | - Wrote replacements for strlcpy and mkdtemp | 6254 | - Wrote replacements for strlcpy and mkdtemp |
6252 | - Released 1.0pre1 | 6255 | - Released 1.0pre1 |
6253 | 6256 | ||
6254 | $Id: ChangeLog,v 1.1463 2001/08/06 22:41:30 mouring Exp $ | 6257 | $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 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include "includes.h" | 9 | #include "includes.h" |
10 | RCSID("$OpenBSD: ssh-keyscan.c,v 1.26 2001/08/05 23:18:20 markus Exp $"); | 10 | RCSID("$OpenBSD: ssh-keyscan.c,v 1.27 2001/08/05 23:29:58 markus Exp $"); |
11 | 11 | ||
12 | #if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H) | 12 | #if defined(HAVE_SYS_QUEUE_H) && !defined(HAVE_BOGUS_SYS_QUEUE_H) |
13 | #include <sys/queue.h> | 13 | #include <sys/queue.h> |
@@ -499,8 +499,11 @@ congreet(int s) | |||
499 | 499 | ||
500 | bufsiz = sizeof(buf); | 500 | bufsiz = sizeof(buf); |
501 | cp = buf; | 501 | cp = buf; |
502 | while (bufsiz-- && (n = read(s, cp, 1)) == 1 && *cp != '\n' && *cp != '\r') | 502 | while (bufsiz-- && (n = read(s, cp, 1)) == 1 && *cp != '\n') { |
503 | if (*cp == '\r') | ||
504 | *cp = '\n'; | ||
503 | cp++; | 505 | cp++; |
506 | } | ||
504 | if (n < 0) { | 507 | if (n < 0) { |
505 | if (errno != ECONNREFUSED) | 508 | if (errno != ECONNREFUSED) |
506 | error("read (%s): %s", c->c_name, strerror(errno)); | 509 | error("read (%s): %s", c->c_name, strerror(errno)); |
@@ -513,7 +516,6 @@ congreet(int s) | |||
513 | return; | 516 | return; |
514 | } | 517 | } |
515 | *cp = '\0'; | 518 | *cp = '\0'; |
516 | fprintf(stderr, "# %s %s\n", c->c_name, buf); | ||
517 | if (c->c_keytype != KT_RSA1) { | 519 | if (c->c_keytype != KT_RSA1) { |
518 | int remote_major, remote_minor; | 520 | int remote_major, remote_minor; |
519 | char remote_version[sizeof buf]; | 521 | char remote_version[sizeof buf]; |
@@ -529,6 +531,7 @@ congreet(int s) | |||
529 | return; | 531 | return; |
530 | } | 532 | } |
531 | } | 533 | } |
534 | fprintf(stderr, "# %s %s\n", c->c_name, chop(buf)); | ||
532 | n = snprintf(buf, sizeof buf, "SSH-%d.%d-OpenSSH-keyscan\r\n", | 535 | n = snprintf(buf, sizeof buf, "SSH-%d.%d-OpenSSH-keyscan\r\n", |
533 | c->c_keytype == KT_RSA1? PROTOCOL_MAJOR_1 : PROTOCOL_MAJOR_2, | 536 | c->c_keytype == KT_RSA1? PROTOCOL_MAJOR_1 : PROTOCOL_MAJOR_2, |
534 | c->c_keytype == KT_RSA1? PROTOCOL_MINOR_1 : PROTOCOL_MINOR_2); | 537 | c->c_keytype == KT_RSA1? PROTOCOL_MINOR_1 : PROTOCOL_MINOR_2); |