summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2008-11-23 13:19:32 +0000
committerColin Watson <cjwatson@debian.org>2008-11-23 13:19:32 +0000
commitf063add71b66011cca8c313fe0c681b0f0e1b97f (patch)
treef1d2d4b4bd694e682a313163fd1374a24e1fedea
parente7e618e9f81c5b722a34996fdf7ec372ec093d85 (diff)
* Backport from upstream CVS (Markus Friedl):
- Only send eow and no-more-sessions requests to openssh 5 and newer; fixes interop problems with broken ssh v2 implementations (closes: #495917).
-rw-r--r--compat.c3
-rw-r--r--compat.h1
-rw-r--r--debian/changelog4
-rw-r--r--nchan.c2
-rw-r--r--ssh.c3
5 files changed, 11 insertions, 2 deletions
diff --git a/compat.c b/compat.c
index bc1131581..8aa43f0f8 100644
--- a/compat.c
+++ b/compat.c
@@ -91,7 +91,8 @@ compat_datafellows(const char *version)
91 "OpenSSH_3.1*", SSH_BUG_EXTEOF|SSH_OLD_FORWARD_ADDR}, 91 "OpenSSH_3.1*", SSH_BUG_EXTEOF|SSH_OLD_FORWARD_ADDR},
92 { "OpenSSH_3.*", SSH_OLD_FORWARD_ADDR }, 92 { "OpenSSH_3.*", SSH_OLD_FORWARD_ADDR },
93 { "Sun_SSH_1.0*", SSH_BUG_NOREKEY|SSH_BUG_EXTEOF}, 93 { "Sun_SSH_1.0*", SSH_BUG_NOREKEY|SSH_BUG_EXTEOF},
94 { "OpenSSH*", 0 }, 94 { "OpenSSH_4*", 0 },
95 { "OpenSSH*", SSH_NEW_OPENSSH },
95 { "*MindTerm*", 0 }, 96 { "*MindTerm*", 0 },
96 { "2.1.0*", SSH_BUG_SIGBLOB|SSH_BUG_HMAC| 97 { "2.1.0*", SSH_BUG_SIGBLOB|SSH_BUG_HMAC|
97 SSH_OLD_SESSIONID|SSH_BUG_DEBUG| 98 SSH_OLD_SESSIONID|SSH_BUG_DEBUG|
diff --git a/compat.h b/compat.h
index 4d8ebc908..5bd89ea73 100644
--- a/compat.h
+++ b/compat.h
@@ -57,6 +57,7 @@
57#define SSH_BUG_FIRSTKEX 0x00800000 57#define SSH_BUG_FIRSTKEX 0x00800000
58#define SSH_OLD_FORWARD_ADDR 0x01000000 58#define SSH_OLD_FORWARD_ADDR 0x01000000
59#define SSH_BUG_RFWD_ADDR 0x02000000 59#define SSH_BUG_RFWD_ADDR 0x02000000
60#define SSH_NEW_OPENSSH 0x04000000
60 61
61void enable_compat13(void); 62void enable_compat13(void);
62void enable_compat20(void); 63void enable_compat20(void);
diff --git a/debian/changelog b/debian/changelog
index 0066dfd58..7b05bd269 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,10 @@ openssh (1:5.1p1-4) UNRELEASED; urgency=low
3 * ssh-copy-id: Strip trailing colons from hostname (closes: #226172, 3 * ssh-copy-id: Strip trailing colons from hostname (closes: #226172,
4 LP: #249706; thanks to Karl Goetz for nudging this along; forwarded 4 LP: #249706; thanks to Karl Goetz for nudging this along; forwarded
5 upstream as https://bugzilla.mindrot.org/show_bug.cgi?id=1530). 5 upstream as https://bugzilla.mindrot.org/show_bug.cgi?id=1530).
6 * Backport from upstream CVS (Markus Friedl):
7 - Only send eow and no-more-sessions requests to openssh 5 and newer;
8 fixes interop problems with broken ssh v2 implementations (closes:
9 #495917).
6 10
7 -- Colin Watson <cjwatson@debian.org> Thu, 09 Oct 2008 12:52:34 +0100 11 -- Colin Watson <cjwatson@debian.org> Thu, 09 Oct 2008 12:52:34 +0100
8 12
diff --git a/nchan.c b/nchan.c
index e0ebf43f1..d31c69b2f 100644
--- a/nchan.c
+++ b/nchan.c
@@ -387,6 +387,8 @@ chan_send_eow2(Channel *c)
387 c->self); 387 c->self);
388 return; 388 return;
389 } 389 }
390 if (!(datafellows & SSH_NEW_OPENSSH))
391 return;
390 packet_start(SSH2_MSG_CHANNEL_REQUEST); 392 packet_start(SSH2_MSG_CHANNEL_REQUEST);
391 packet_put_int(c->remote_id); 393 packet_put_int(c->remote_id);
392 packet_put_cstring("eow@openssh.com"); 394 packet_put_cstring("eow@openssh.com");
diff --git a/ssh.c b/ssh.c
index e2e2ef498..2b55e6397 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1205,7 +1205,8 @@ ssh_session2(void)
1205 id = ssh_session2_open(); 1205 id = ssh_session2_open();
1206 1206
1207 /* If we don't expect to open a new session, then disallow it */ 1207 /* If we don't expect to open a new session, then disallow it */
1208 if (options.control_master == SSHCTL_MASTER_NO) { 1208 if (options.control_master == SSHCTL_MASTER_NO &&
1209 (datafellows & SSH_NEW_OPENSSH)) {
1209 debug("Requesting no-more-sessions@openssh.com"); 1210 debug("Requesting no-more-sessions@openssh.com");
1210 packet_start(SSH2_MSG_GLOBAL_REQUEST); 1211 packet_start(SSH2_MSG_GLOBAL_REQUEST);
1211 packet_put_cstring("no-more-sessions@openssh.com"); 1212 packet_put_cstring("no-more-sessions@openssh.com");