*/
#include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.174 2001/03/09 12:30:29 deraadt Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.178 2001/03/23 14:28:32 markus Exp $");
#include <openssl/dh.h>
#include <openssl/bn.h>
fatal_cleanup();
}
if (buf[i] == '\r') {
- buf[i] = '\n';
- buf[i + 1] = 0;
+ buf[i] = 0;
/* Kludge for F-Secure Macintosh < 1.0.2 */
if (i == 12 &&
strncmp(buf, "SSH-1.5-W1.0", 12) == 0)
continue;
}
if (buf[i] == '\n') {
- /* buf[i] == '\n' */
- buf[i + 1] = 0;
+ buf[i] = 0;
break;
}
}
compat_datafellows(remote_version);
+ if (datafellows & SSH_BUG_SCANNER) {
+ log("scanned from %s with %s. Don't panic.",
+ get_remote_ipaddr(), client_version_string);
+ fatal_cleanup();
+ }
+
mismatch = 0;
switch(remote_major) {
case 1:
break;
}
chop(server_version_string);
- chop(client_version_string);
debug("Local version string %.200s", server_version_string);
if (mismatch) {
/* Chdir to the root directory so that the current disk can be
unmounted if desired. */
chdir("/");
+
+ /* ignore SIGPIPE */
+ signal(SIGPIPE, SIG_IGN);
/* Start listening for a socket, unless started from inetd. */
if (inetd_flag) {
}
myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types();
+ myproposal[PROPOSAL_ENC_ALGS_STOC] =
+ compat_cipher_proposal(myproposal[PROPOSAL_ENC_ALGS_STOC]);
+
server_kexinit = kex_init(myproposal);
client_kexinit = xmalloc(sizeof(*client_kexinit));
buffer_init(client_kexinit);