diff options
author | Colin Watson <cjwatson@debian.org> | 2017-10-04 11:23:58 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2017-10-04 11:23:58 +0100 |
commit | 62f54f20bf351468e0124f63cc2902ee40d9b0e9 (patch) | |
tree | 3e090f2711b94ca5029d3fa3e8047b1ed1448b1f /compat.c | |
parent | 6fabaf6fd9b07cc8bc6a17c9c4a5b76849cfc874 (diff) | |
parent | 66bf74a92131b7effe49fb0eefe5225151869dc5 (diff) |
Import openssh_7.6p1.orig.tar.gz
Diffstat (limited to 'compat.c')
-rw-r--r-- | compat.c | 34 |
1 files changed, 7 insertions, 27 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: compat.c,v 1.100 2017/02/03 23:01:19 djm Exp $ */ | 1 | /* $OpenBSD: compat.c,v 1.104 2017/07/25 09:22:25 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 1999, 2000, 2001, 2002 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -39,24 +39,8 @@ | |||
39 | #include "match.h" | 39 | #include "match.h" |
40 | #include "kex.h" | 40 | #include "kex.h" |
41 | 41 | ||
42 | int compat13 = 0; | ||
43 | int compat20 = 0; | ||
44 | int datafellows = 0; | 42 | int datafellows = 0; |
45 | 43 | ||
46 | void | ||
47 | enable_compat20(void) | ||
48 | { | ||
49 | if (compat20) | ||
50 | return; | ||
51 | debug("Enabling compatibility mode for protocol 2.0"); | ||
52 | compat20 = 1; | ||
53 | } | ||
54 | void | ||
55 | enable_compat13(void) | ||
56 | { | ||
57 | debug("Enabling compatibility mode for protocol 1.3"); | ||
58 | compat13 = 1; | ||
59 | } | ||
60 | /* datafellows bug compatibility */ | 44 | /* datafellows bug compatibility */ |
61 | u_int | 45 | u_int |
62 | compat_datafellows(const char *version) | 46 | compat_datafellows(const char *version) |
@@ -193,9 +177,12 @@ compat_datafellows(const char *version) | |||
193 | "TTSSH/2.72*", SSH_BUG_HOSTKEYS }, | 177 | "TTSSH/2.72*", SSH_BUG_HOSTKEYS }, |
194 | { "WinSCP_release_4*," | 178 | { "WinSCP_release_4*," |
195 | "WinSCP_release_5.0*," | 179 | "WinSCP_release_5.0*," |
196 | "WinSCP_release_5.1*," | 180 | "WinSCP_release_5.1," |
197 | "WinSCP_release_5.5*," | 181 | "WinSCP_release_5.1.*," |
198 | "WinSCP_release_5.6*," | 182 | "WinSCP_release_5.5," |
183 | "WinSCP_release_5.5.*," | ||
184 | "WinSCP_release_5.6," | ||
185 | "WinSCP_release_5.6.*," | ||
199 | "WinSCP_release_5.7," | 186 | "WinSCP_release_5.7," |
200 | "WinSCP_release_5.7.1," | 187 | "WinSCP_release_5.7.1," |
201 | "WinSCP_release_5.7.2," | 188 | "WinSCP_release_5.7.2," |
@@ -232,13 +219,6 @@ proto_spec(const char *spec) | |||
232 | return ret; | 219 | return ret; |
233 | for ((p = strsep(&q, SEP)); p && *p != '\0'; (p = strsep(&q, SEP))) { | 220 | for ((p = strsep(&q, SEP)); p && *p != '\0'; (p = strsep(&q, SEP))) { |
234 | switch (atoi(p)) { | 221 | switch (atoi(p)) { |
235 | case 1: | ||
236 | #ifdef WITH_SSH1 | ||
237 | if (ret == SSH_PROTO_UNKNOWN) | ||
238 | ret |= SSH_PROTO_1_PREFERRED; | ||
239 | ret |= SSH_PROTO_1; | ||
240 | #endif | ||
241 | break; | ||
242 | case 2: | 222 | case 2: |
243 | ret |= SSH_PROTO_2; | 223 | ret |= SSH_PROTO_2; |
244 | break; | 224 | break; |