summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-04-29 19:16:53 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-04-29 19:16:53 +0000
commitceee9826a41f98b2638f943bc8ab2891c6731e4d (patch)
treeed7ceb17618fc3d5a170990837a5aff348accc21 /usr.bin
parent2636bafbb2f1f9d5afe4e50f136507464daf490e (diff)
more ssh.com-2.0.x bug-compat; from per@appgate.com
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/channels.c4
-rw-r--r--usr.bin/ssh/clientloop.c8
-rw-r--r--usr.bin/ssh/compat.c6
-rw-r--r--usr.bin/ssh/compat.h37
-rw-r--r--usr.bin/ssh/serverloop.c8
5 files changed, 34 insertions, 29 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 08780b0ebd9..b6b0b26eccf 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -40,7 +40,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: channels.c,v 1.109 2001/04/17 12:55:03 markus Exp $");
+RCSID("$OpenBSD: channels.c,v 1.110 2001/04/29 19:16:52 markus Exp $");
#include <openssl/rsa.h>
#include <openssl/dsa.h>
@@ -1534,7 +1534,7 @@ channel_input_open_failure(int type, int plen, void *ctxt)
"non-opening channel %d.", id);
if (compat20) {
reason = packet_get_int();
- if (packet_remaining() > 0) {
+ if (!(datafellows & SSH_BUG_OPENFAILURE)) {
msg = packet_get_string(NULL);
lang = packet_get_string(NULL);
}
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c
index 369ffe4acf8..d761897385c 100644
--- a/usr.bin/ssh/clientloop.c
+++ b/usr.bin/ssh/clientloop.c
@@ -59,7 +59,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: clientloop.c,v 1.65 2001/04/20 07:17:51 djm Exp $");
+RCSID("$OpenBSD: clientloop.c,v 1.66 2001/04/29 19:16:52 markus Exp $");
#include "ssh.h"
#include "ssh1.h"
@@ -1154,8 +1154,10 @@ client_input_channel_open(int type, int plen, void *ctxt)
packet_start(SSH2_MSG_CHANNEL_OPEN_FAILURE);
packet_put_int(rchan);
packet_put_int(SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED);
- packet_put_cstring("bla bla");
- packet_put_cstring("");
+ if (!(datafellows & SSH_BUG_OPENFAILURE)) {
+ packet_put_cstring("bla bla");
+ packet_put_cstring("");
+ }
packet_send();
}
xfree(ctype);
diff --git a/usr.bin/ssh/compat.c b/usr.bin/ssh/compat.c
index e0f9d8549bc..b9a518d2f90 100644
--- a/usr.bin/ssh/compat.c
+++ b/usr.bin/ssh/compat.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: compat.c,v 1.47 2001/04/18 23:43:25 markus Exp $");
+RCSID("$OpenBSD: compat.c,v 1.48 2001/04/29 19:16:52 markus Exp $");
#include <regex.h>
@@ -85,12 +85,12 @@ compat_datafellows(const char *version)
SSH_OLD_SESSIONID|SSH_BUG_DEBUG|
SSH_BUG_PKSERVICE|SSH_BUG_X11FWD|
SSH_BUG_PKOK|SSH_BUG_RSASIGMD5|
- SSH_BUG_HBSERVICE },
+ SSH_BUG_HBSERVICE|SSH_BUG_OPENFAILURE },
{ "^2\\.0\\.", SSH_BUG_SIGBLOB|SSH_BUG_HMAC|
SSH_OLD_SESSIONID|SSH_BUG_DEBUG|
SSH_BUG_PKSERVICE|SSH_BUG_X11FWD|
SSH_BUG_PKAUTH|SSH_BUG_PKOK|
- SSH_BUG_RSASIGMD5 },
+ SSH_BUG_RSASIGMD5|SSH_BUG_OPENFAILURE },
{ "^2\\.[23]\\.0", SSH_BUG_HMAC|SSH_BUG_RSASIGMD5 },
{ "^2\\.3\\.", SSH_BUG_RSASIGMD5 },
{ "^2\\.[2-9]\\.", 0 },
diff --git a/usr.bin/ssh/compat.h b/usr.bin/ssh/compat.h
index fc6f3344f5a..fa509c247f4 100644
--- a/usr.bin/ssh/compat.h
+++ b/usr.bin/ssh/compat.h
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* RCSID("$OpenBSD: compat.h,v 1.23 2001/04/12 19:15:24 markus Exp $"); */
+/* RCSID("$OpenBSD: compat.h,v 1.24 2001/04/29 19:16:52 markus Exp $"); */
#ifndef COMPAT_H
#define COMPAT_H
@@ -31,23 +31,24 @@
#define SSH_PROTO_1_PREFERRED 0x02
#define SSH_PROTO_2 0x04
-#define SSH_BUG_SIGBLOB 0x0001
-#define SSH_BUG_PKSERVICE 0x0002
-#define SSH_BUG_HMAC 0x0004
-#define SSH_BUG_X11FWD 0x0008
-#define SSH_OLD_SESSIONID 0x0010
-#define SSH_BUG_PKAUTH 0x0020
-#define SSH_BUG_DEBUG 0x0040
-#define SSH_BUG_BANNER 0x0080
-#define SSH_BUG_IGNOREMSG 0x0100
-#define SSH_BUG_PKOK 0x0200
-#define SSH_BUG_PASSWORDPAD 0x0400
-#define SSH_BUG_SCANNER 0x0800
-#define SSH_BUG_BIGENDIANAES 0x1000
-#define SSH_BUG_RSASIGMD5 0x2000
-#define SSH_OLD_DHGEX 0x4000
-#define SSH_BUG_NOREKEY 0x8000
-#define SSH_BUG_HBSERVICE 0x10000
+#define SSH_BUG_SIGBLOB 0x00000001
+#define SSH_BUG_PKSERVICE 0x00000002
+#define SSH_BUG_HMAC 0x00000004
+#define SSH_BUG_X11FWD 0x00000008
+#define SSH_OLD_SESSIONID 0x00000010
+#define SSH_BUG_PKAUTH 0x00000020
+#define SSH_BUG_DEBUG 0x00000040
+#define SSH_BUG_BANNER 0x00000080
+#define SSH_BUG_IGNOREMSG 0x00000100
+#define SSH_BUG_PKOK 0x00000200
+#define SSH_BUG_PASSWORDPAD 0x00000400
+#define SSH_BUG_SCANNER 0x00000800
+#define SSH_BUG_BIGENDIANAES 0x00001000
+#define SSH_BUG_RSASIGMD5 0x00002000
+#define SSH_OLD_DHGEX 0x00004000
+#define SSH_BUG_NOREKEY 0x00008000
+#define SSH_BUG_HBSERVICE 0x00010000
+#define SSH_BUG_OPENFAILURE 0x00020000
void enable_compat13(void);
void enable_compat20(void);
diff --git a/usr.bin/ssh/serverloop.c b/usr.bin/ssh/serverloop.c
index 688eebbe56c..bca96ef6594 100644
--- a/usr.bin/ssh/serverloop.c
+++ b/usr.bin/ssh/serverloop.c
@@ -35,7 +35,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: serverloop.c,v 1.62 2001/04/29 18:32:52 markus Exp $");
+RCSID("$OpenBSD: serverloop.c,v 1.63 2001/04/29 19:16:52 markus Exp $");
#include "xmalloc.h"
#include "packet.h"
@@ -894,8 +894,10 @@ server_input_channel_open(int type, int plen, void *ctxt)
packet_start(SSH2_MSG_CHANNEL_OPEN_FAILURE);
packet_put_int(rchan);
packet_put_int(SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED);
- packet_put_cstring("bla bla");
- packet_put_cstring("");
+ if (!(datafellows & SSH_BUG_OPENFAILURE)) {
+ packet_put_cstring("bla bla");
+ packet_put_cstring("");
+ }
packet_send();
}
xfree(ctype);