vishalmishra434 / rpms / openssh

Forked from rpms/openssh 3 months ago
Clone
Tomáš Mráz b9a07a
diff -up openssh-5.1p1/nchan.c.compat-sessions openssh-5.1p1/nchan.c
Tomáš Mráz b9a07a
--- openssh-5.1p1/nchan.c.compat-sessions	2008-07-02 14:32:43.000000000 +0200
Tomáš Mráz b9a07a
+++ openssh-5.1p1/nchan.c	2008-10-17 09:40:37.000000000 +0200
Tomáš Mráz b9a07a
@@ -387,6 +387,8 @@ chan_send_eow2(Channel *c)
Tomáš Mráz b9a07a
 		    c->self);
Tomáš Mráz b9a07a
 		return;
Tomáš Mráz b9a07a
 	}
Tomáš Mráz b9a07a
+	if (!(datafellows & SSH_NEW_OPENSSH))
Tomáš Mráz b9a07a
+		return;
Tomáš Mráz b9a07a
 	packet_start(SSH2_MSG_CHANNEL_REQUEST);
Tomáš Mráz b9a07a
 	packet_put_int(c->remote_id);
Tomáš Mráz b9a07a
 	packet_put_cstring("eow@openssh.com");
Tomáš Mráz b9a07a
diff -up openssh-5.1p1/compat.c.compat-sessions openssh-5.1p1/compat.c
Tomáš Mráz b9a07a
--- openssh-5.1p1/compat.c.compat-sessions	2007-01-05 06:26:46.000000000 +0100
Tomáš Mráz b9a07a
+++ openssh-5.1p1/compat.c	2008-10-17 09:40:37.000000000 +0200
Tomáš Mráz b9a07a
@@ -91,7 +91,8 @@ compat_datafellows(const char *version)
Tomáš Mráz b9a07a
 		  "OpenSSH_3.1*",	SSH_BUG_EXTEOF|SSH_OLD_FORWARD_ADDR},
Tomáš Mráz b9a07a
 		{ "OpenSSH_3.*",	SSH_OLD_FORWARD_ADDR },
Tomáš Mráz b9a07a
 		{ "Sun_SSH_1.0*",	SSH_BUG_NOREKEY|SSH_BUG_EXTEOF},
Tomáš Mráz b9a07a
-		{ "OpenSSH*",		0 },
Tomáš Mráz b9a07a
+		{ "OpenSSH_4*",		0 },
Tomáš Mráz b9a07a
+		{ "OpenSSH*",		SSH_NEW_OPENSSH },
Tomáš Mráz b9a07a
 		{ "*MindTerm*",		0 },
Tomáš Mráz b9a07a
 		{ "2.1.0*",		SSH_BUG_SIGBLOB|SSH_BUG_HMAC|
Tomáš Mráz b9a07a
 					SSH_OLD_SESSIONID|SSH_BUG_DEBUG|
Tomáš Mráz b9a07a
diff -up openssh-5.1p1/compat.h.compat-sessions openssh-5.1p1/compat.h
Tomáš Mráz b9a07a
--- openssh-5.1p1/compat.h.compat-sessions	2007-01-05 06:26:46.000000000 +0100
Tomáš Mráz b9a07a
+++ openssh-5.1p1/compat.h	2008-10-17 09:40:37.000000000 +0200
Tomáš Mráz b9a07a
@@ -57,6 +57,7 @@
Tomáš Mráz b9a07a
 #define SSH_BUG_FIRSTKEX	0x00800000
Tomáš Mráz b9a07a
 #define SSH_OLD_FORWARD_ADDR	0x01000000
Tomáš Mráz b9a07a
 #define SSH_BUG_RFWD_ADDR	0x02000000
Tomáš Mráz b9a07a
+#define SSH_NEW_OPENSSH		0x04000000
Tomáš Mráz b9a07a
 
Tomáš Mráz b9a07a
 void     enable_compat13(void);
Tomáš Mráz b9a07a
 void     enable_compat20(void);
Tomáš Mráz b9a07a
diff -up openssh-5.1p1/ssh.c.compat-sessions openssh-5.1p1/ssh.c
Tomáš Mráz b9a07a
--- openssh-5.1p1/ssh.c.compat-sessions	2008-09-12 11:03:32.000000000 +0200
Tomáš Mráz b9a07a
+++ openssh-5.1p1/ssh.c	2008-10-17 09:40:37.000000000 +0200
Tomáš Mráz b9a07a
@@ -1203,7 +1203,8 @@ ssh_session2(void)
Tomáš Mráz b9a07a
 		id = ssh_session2_open();
Tomáš Mráz b9a07a
 
Tomáš Mráz b9a07a
 	/* If we don't expect to open a new session, then disallow it */
Tomáš Mráz b9a07a
-	if (options.control_master == SSHCTL_MASTER_NO) {
Tomáš Mráz b9a07a
+	if (options.control_master == SSHCTL_MASTER_NO &&
Tomáš Mráz b9a07a
+	    (datafellows & SSH_NEW_OPENSSH)) {
Tomáš Mráz b9a07a
 		debug("Requesting no-more-sessions@openssh.com");
Tomáš Mráz b9a07a
 		packet_start(SSH2_MSG_GLOBAL_REQUEST);
Tomáš Mráz b9a07a
 		packet_put_cstring("no-more-sessions@openssh.com");