forked from openssh/openssh-portable
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop compatibility hacks for some ancient SSH implementations, including ssh.com <=2.* and OpenSSH <= 3.*. These versions were all released in or before 2001 and predate the final SSH RFCs. The hacks in question aren't necessary for RFC- compliant SSH implementations. ok markus@ OpenBSD-Commit-ID: 4be81c67db57647f907f4e881fb9341448606138
- Loading branch information
Showing
17 changed files
with
111 additions
and
303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: authfd.c,v 1.105 2017/07/01 13:50:45 djm Exp $ */ | ||
/* $OpenBSD: authfd.c,v 1.106 2018/01/23 05:27:21 djm Exp $ */ | ||
/* | ||
* Author: Tatu Ylonen <[email protected]> | ||
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland | ||
|
@@ -353,8 +353,6 @@ ssh_agent_sign(int sock, const struct sshkey *key, | |
|
||
if (datalen > SSH_KEY_MAX_SIGN_DATA_SIZE) | ||
return SSH_ERR_INVALID_ARGUMENT; | ||
if (compat & SSH_BUG_SIGBLOB) | ||
flags |= SSH_AGENT_OLD_SIGNATURE; | ||
if ((msg = sshbuf_new()) == NULL) | ||
return SSH_ERR_ALLOC_FAIL; | ||
if ((r = sshkey_to_blob(key, &blob, &blen)) != 0) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: channels.c,v 1.377 2017/12/05 01:30:19 djm Exp $ */ | ||
/* $OpenBSD: channels.c,v 1.378 2018/01/23 05:27:21 djm Exp $ */ | ||
/* | ||
* Author: Tatu Ylonen <[email protected]> | ||
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland | ||
|
@@ -1582,13 +1582,8 @@ channel_post_x11_listener(struct ssh *ssh, Channel *c, | |
SSH_CHANNEL_OPENING, newsock, newsock, -1, | ||
c->local_window_max, c->local_maxpacket, 0, buf, 1); | ||
open_preamble(ssh, __func__, nc, "x11"); | ||
if ((r = sshpkt_put_cstring(ssh, remote_ipaddr)) != 0) { | ||
fatal("%s: channel %i: reply %s", __func__, | ||
c->self, ssh_err(r)); | ||
} | ||
if ((datafellows & SSH_BUG_X11FWD) != 0) | ||
debug2("channel %d: ssh2 x11 bug compat mode", nc->self); | ||
else if ((r = sshpkt_put_u32(ssh, remote_port)) != 0) { | ||
if ((r = sshpkt_put_cstring(ssh, remote_ipaddr)) != 0 || | ||
(r = sshpkt_put_u32(ssh, remote_port)) != 0) { | ||
fatal("%s: channel %i: reply %s", __func__, | ||
c->self, ssh_err(r)); | ||
} | ||
|
@@ -1824,15 +1819,13 @@ channel_post_connecting(struct ssh *ssh, Channel *c, | |
if ((r = sshpkt_start(ssh, | ||
SSH2_MSG_CHANNEL_OPEN_FAILURE)) != 0 || | ||
(r = sshpkt_put_u32(ssh, c->remote_id)) != 0 || | ||
(r = sshpkt_put_u32(ssh, SSH2_OPEN_CONNECT_FAILED)) | ||
!= 0) | ||
fatal("%s: channel %i: failure: %s", __func__, | ||
c->self, ssh_err(r)); | ||
if ((datafellows & SSH_BUG_OPENFAILURE) == 0 && | ||
((r = sshpkt_put_cstring(ssh, strerror(err))) != 0 || | ||
(r = sshpkt_put_cstring(ssh, "")) != 0)) | ||
(r = sshpkt_put_u32(ssh, | ||
SSH2_OPEN_CONNECT_FAILED)) != 0 || | ||
(r = sshpkt_put_cstring(ssh, strerror(err))) != 0 || | ||
(r = sshpkt_put_cstring(ssh, "")) != 0) { | ||
fatal("%s: channel %i: failure: %s", __func__, | ||
c->self, ssh_err(r)); | ||
} | ||
if ((r = sshpkt_send(ssh)) != 0) | ||
fatal("%s: channel %i: %s", __func__, c->self, | ||
ssh_err(r)); | ||
|
@@ -3110,13 +3103,11 @@ channel_input_open_failure(int type, u_int32_t seq, struct ssh *ssh) | |
error("%s: reason: %s", __func__, ssh_err(r)); | ||
packet_disconnect("Invalid open failure message"); | ||
} | ||
if ((datafellows & SSH_BUG_OPENFAILURE) == 0) { | ||
/* skip language */ | ||
if ((r = sshpkt_get_cstring(ssh, &msg, NULL)) != 0 || | ||
(r = sshpkt_get_string_direct(ssh, NULL, NULL)) != 0) { | ||
error("%s: message/lang: %s", __func__, ssh_err(r)); | ||
packet_disconnect("Invalid open failure message"); | ||
} | ||
/* skip language */ | ||
if ((r = sshpkt_get_cstring(ssh, &msg, NULL)) != 0 || | ||
(r = sshpkt_get_string_direct(ssh, NULL, NULL)) != 0) { | ||
error("%s: message/lang: %s", __func__, ssh_err(r)); | ||
packet_disconnect("Invalid open failure message"); | ||
} | ||
ssh_packet_check_eom(ssh); | ||
logit("channel %d: open failed: %s%s%s", c->self, | ||
|
@@ -3664,15 +3655,9 @@ static const char * | |
channel_rfwd_bind_host(const char *listen_host) | ||
{ | ||
if (listen_host == NULL) { | ||
if (datafellows & SSH_BUG_RFWD_ADDR) | ||
return "127.0.0.1"; | ||
else | ||
return "localhost"; | ||
return "localhost"; | ||
} else if (*listen_host == '\0' || strcmp(listen_host, "*") == 0) { | ||
if (datafellows & SSH_BUG_RFWD_ADDR) | ||
return "0.0.0.0"; | ||
else | ||
return ""; | ||
return ""; | ||
} else | ||
return listen_host; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: clientloop.c,v 1.309 2017/12/18 23:16:23 djm Exp $ */ | ||
/* $OpenBSD: clientloop.c,v 1.310 2018/01/23 05:27:21 djm Exp $ */ | ||
/* | ||
* Author: Tatu Ylonen <[email protected]> | ||
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland | ||
|
@@ -1541,12 +1541,7 @@ client_request_x11(struct ssh *ssh, const char *request_type, int rchan) | |
return NULL; | ||
} | ||
originator = packet_get_string(NULL); | ||
if (datafellows & SSH_BUG_X11FWD) { | ||
debug2("buggy server: x11 request w/o originator_port"); | ||
originator_port = 0; | ||
} else { | ||
originator_port = packet_get_int(); | ||
} | ||
originator_port = packet_get_int(); | ||
packet_check_eom(); | ||
/* XXX check permission */ | ||
debug("client_request_x11: request from %s %d", originator, | ||
|
@@ -1678,10 +1673,8 @@ client_input_channel_open(int type, u_int32_t seq, struct ssh *ssh) | |
packet_start(SSH2_MSG_CHANNEL_OPEN_FAILURE); | ||
packet_put_int(rchan); | ||
packet_put_int(SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED); | ||
if (!(datafellows & SSH_BUG_OPENFAILURE)) { | ||
packet_put_cstring("open failed"); | ||
packet_put_cstring(""); | ||
} | ||
packet_put_cstring("open failed"); | ||
packet_put_cstring(""); | ||
packet_send(); | ||
} | ||
free(ctype); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.