From 6db9484b6612d9470b67a440793ac7969dd62795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= Date: Sun, 20 Dec 1998 21:49:53 +0100 Subject: [PATCH] * server.c (do_line): Accept client version 1.99, if DATAFELLOWS_SSH2_GREETING_WORKAROUND is defined. Rev: src/server.c:1.34 --- src/server.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 759f825e..00d174fb 100644 --- a/src/server.c +++ b/src/server.c @@ -52,6 +52,14 @@ #include #include +/* Datafellows workaround. + * + * It seems that Datafellows' ssh2 client says it want to use protocol + * version 1.99 in its greeting to the server. This behaviour is not + * allowed by the specification. Define this to support it anyway. */ + +#define DATAFELLOWS_SSH2_GREETING_WORKAROUND + /* Socket workround */ #ifndef SHUTDOWN_WORKS_WITH_UNIX_SOCKETS @@ -174,7 +182,11 @@ static struct read_handler *do_line(struct line_handler **h, if ( (length >= 4) && !memcmp(line, "SSH-", 4)) { /* Parse and remember format string */ - if ((length >= 8) && !memcmp(line + 4, "2.0-", 4)) + if ( ((length >= 8) && !memcmp(line + 4, "2.0-", 4)) +#ifdef DATAFELLOWS_SSH2_GREETING_WORKAROUND + || ((length >= 9) && !memcmp(line + 4, "1.99-", 5)) +#endif + ) { struct read_handler *new = make_read_packet (make_packet_unpad -- GitLab