- fix compatibility with some servers (#466818)

This commit is contained in:
Tomáš Mráz 2008-10-17 08:34:36 +00:00
parent 578f0d08a9
commit b9a07ad737
3 changed files with 59 additions and 5 deletions

View File

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

View File

@ -37,10 +37,10 @@ diff -up openssh-5.1p1/sshd_config.redhat openssh-5.1p1/sshd_config
#UsePAM no
+UsePAM yes
+
+# Accept locale-related environment variables
+AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
+AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
+AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
+# Accept locale-related environment variables
+AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
+AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
+AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
#AllowAgentForwarding yes
#AllowTcpForwarding yes

View File

@ -63,7 +63,7 @@
Summary: The OpenSSH implementation of SSH protocol versions 1 and 2
Name: openssh
Version: 5.1p1
Release: 2%{?dist}%{?rescue_rel}
Release: 3%{?dist}%{?rescue_rel}
URL: http://www.openssh.com/portable.html
#Source0: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz
#Source1: ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-%{version}.tar.gz.asc
@ -97,6 +97,7 @@ Patch54: openssh-5.1p1-gssapi-role.patch
Patch55: openssh-5.1p1-cloexec.patch
Patch62: openssh-5.1p1-scp-manpage.patch
Patch63: openssh-5.1p1-bannerlen.patch
Patch64: openssh-5.1p1-compat-sessions.patch
License: BSD
Group: Applications/Internet
@ -229,6 +230,7 @@ an X11 passphrase dialog for OpenSSH.
%patch55 -p1 -b .cloexec
%patch62 -p1 -b .manpage
%patch63 -p1 -b .bannerlen
%patch64 -p1 -b .compat-sessions
autoreconf
@ -480,6 +482,9 @@ fi
%endif
%changelog
* Fri Oct 17 2008 Tomas Mraz <tmraz@redhat.com> - 5.1p1-3
- fix compatibility with some servers (#466818)
* Thu Jul 31 2008 Tomas Mraz <tmraz@redhat.com> - 5.1p1-2
- fixed zero length banner problem (#457326)