mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-11-24 10:53:24 +08:00
- djm@cvs.openbsd.org 2013/11/20 02:19:01
[sshd.c] delay closure of in/out fds until after "Bad protocol version identification..." message, as get_remote_ipaddr/get_remote_port require them open.
This commit is contained in:
parent
867e6934be
commit
23e00aa6ba
@ -6,6 +6,11 @@
|
|||||||
- markus@cvs.openbsd.org 2013/11/13 13:48:20
|
- markus@cvs.openbsd.org 2013/11/13 13:48:20
|
||||||
[ssh-pkcs11.c]
|
[ssh-pkcs11.c]
|
||||||
add missing braces found by pedro
|
add missing braces found by pedro
|
||||||
|
- djm@cvs.openbsd.org 2013/11/20 02:19:01
|
||||||
|
[sshd.c]
|
||||||
|
delay closure of in/out fds until after "Bad protocol version
|
||||||
|
identification..." message, as get_remote_ipaddr/get_remote_port
|
||||||
|
require them open.
|
||||||
|
|
||||||
20131110
|
20131110
|
||||||
- (dtucker) [regress/keytype.sh] Populate ECDSA key types to be tested by
|
- (dtucker) [regress/keytype.sh] Populate ECDSA key types to be tested by
|
||||||
|
6
sshd.c
6
sshd.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: sshd.c,v 1.410 2013/11/02 21:59:15 markus Exp $ */
|
/* $OpenBSD: sshd.c,v 1.411 2013/11/20 02:19:01 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
@ -480,11 +480,11 @@ sshd_exchange_identification(int sock_in, int sock_out)
|
|||||||
&remote_major, &remote_minor, remote_version) != 3) {
|
&remote_major, &remote_minor, remote_version) != 3) {
|
||||||
s = "Protocol mismatch.\n";
|
s = "Protocol mismatch.\n";
|
||||||
(void) atomicio(vwrite, sock_out, s, strlen(s));
|
(void) atomicio(vwrite, sock_out, s, strlen(s));
|
||||||
close(sock_in);
|
|
||||||
close(sock_out);
|
|
||||||
logit("Bad protocol version identification '%.100s' "
|
logit("Bad protocol version identification '%.100s' "
|
||||||
"from %s port %d", client_version_string,
|
"from %s port %d", client_version_string,
|
||||||
get_remote_ipaddr(), get_remote_port());
|
get_remote_ipaddr(), get_remote_port());
|
||||||
|
close(sock_in);
|
||||||
|
close(sock_out);
|
||||||
cleanup_exit(255);
|
cleanup_exit(255);
|
||||||
}
|
}
|
||||||
debug("Client protocol version %d.%d; client software version %.100s",
|
debug("Client protocol version %d.%d; client software version %.100s",
|
||||||
|
Loading…
Reference in New Issue
Block a user