]> andersk Git - openssh.git/blobdiff - compat.c
#error no longer required, dealt with in configure.in now.
[openssh.git] / compat.c
index 71d12010c15aab5f4657dbecb5f7943ef58be5b5..83340993d89bfeb4f4252223ea70efe1cba3571a 100644 (file)
--- a/compat.c
+++ b/compat.c
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: compat.c,v 1.24 2000/10/10 20:20:45 markus Exp $");
+RCSID("$OpenBSD: compat.c,v 1.34 2001/01/21 19:05:48 markus Exp $");
+
+#ifdef HAVE_LIBPCRE
+#  include <pcreposix.h>
+#else /* Use native regex libraries */
+#  ifdef HAVE_REGEX_H
+#    include <regex.h>
+#  else
+#    include "fake-regex.h"
+#  endif
+#endif /* HAVE_LIBPCRE */
 
-#include "ssh.h"
 #include "packet.h"
 #include "xmalloc.h"
 #include "compat.h"
-#ifdef HAVE_LIBRX
-#  include <rxposix.h>
-#else /* Use native regex libraries */
-#  include <regex.h>
-#endif /* HAVE_LIBRX */
+#include "log.h"
 
 int compat13 = 0;
 int compat20 = 0;
@@ -62,13 +67,26 @@ compat_datafellows(const char *version)
                char    *pat;
                int     bugs;
        } check[] = {
-               {"^.*MindTerm",         0},
-               {"^2\\.1\\.0 ",         SSH_BUG_SIGBLOB|SSH_BUG_HMAC},
-               {"^2\\.0\\.",           SSH_BUG_SIGBLOB|SSH_BUG_HMAC|SSH_BUG_PUBKEYAUTH|SSH_BUG_X11FWD},
-               {"^2\\.[23]\\.0 ",      SSH_BUG_HMAC|SSH_COMPAT_SESSIONID_ENCODING},
-               {"^2\\.[2-9]\\.",       SSH_COMPAT_SESSIONID_ENCODING},
-               {"^2\\.",               SSH_BUG_HMAC|SSH_COMPAT_SESSIONID_ENCODING},
-               {NULL,                  0}
+               { "^OpenSSH[-_]2\\.[012]",
+                                       SSH_OLD_SESSIONID|SSH_BUG_BANNER },
+               { "^OpenSSH_2\\.3\\.0", SSH_BUG_BANNER },
+               { "^OpenSSH",           0 },
+               { "MindTerm",           0 },
+               { "^2\\.1\\.0",         SSH_BUG_SIGBLOB|SSH_BUG_HMAC|
+                                       SSH_OLD_SESSIONID|SSH_BUG_DEBUG },
+               { "^2\\.0\\.1[3-9]",    SSH_BUG_SIGBLOB|SSH_BUG_HMAC|
+                                       SSH_OLD_SESSIONID|SSH_BUG_DEBUG|
+                                       SSH_BUG_PKSERVICE|SSH_BUG_X11FWD },
+               { "^2\\.0\\.",          SSH_BUG_SIGBLOB|SSH_BUG_HMAC|
+                                       SSH_OLD_SESSIONID|SSH_BUG_DEBUG|
+                                       SSH_BUG_PKSERVICE|SSH_BUG_X11FWD|
+                                       SSH_BUG_PKAUTH },
+               { "^2\\.[23]\\.0",      SSH_BUG_HMAC},
+               { "^2\\.[2-9]\\.",      0 },
+               { "^2\\.4$",            SSH_OLD_SESSIONID}, /* Van Dyke */
+               { "^3\\.0 SecureCRT",   SSH_OLD_SESSIONID},
+               { "^1\\.7 SecureFX",    SSH_OLD_SESSIONID},
+               { NULL,                 0 }
        };
        /* process table, return first match */
        for (i = 0; check[i].pat; i++) {
@@ -82,7 +100,7 @@ compat_datafellows(const char *version)
                ret = regexec(&reg, version, 0, NULL, 0);
                regfree(&reg);
                if (ret == 0) {
-                       debug("match: %s pat %s\n", version, check[i].pat);
+                       debug("match: %s pat %s", version, check[i].pat);
                        datafellows = check[i].bugs;
                        return;
                }
This page took 0.049023 seconds and 4 git commands to generate.