From 2ff01c50ecd33579f98cd56f001968086fe34c2c Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 27 Jul 2011 18:46:33 +0000 Subject: [PATCH] Merge r9254 (the PSCP/PSFTP protocol override fix). [originally from svn r9255] [r9254 == f14953d9e94c176cfc928bb719d6f613da96717e] --- Recipe | 2 +- be_none.c | 2 +- be_ssh.c | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 be_ssh.c diff --git a/Recipe b/Recipe index 1a34bb86..20ab841e 100644 --- a/Recipe +++ b/Recipe @@ -289,7 +289,7 @@ LIBS = advapi32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib # to proxy.c depending on whether we're crypto-avoidant or not. BE_ALL = be_all cproxy BE_NOSSH = be_nossh nocproxy -BE_SSH = be_none cproxy +BE_SSH = be_ssh cproxy BE_NONE = be_none nocproxy # More backend sets, with the additional Windows serial-port module. W_BE_ALL = be_all_s winser cproxy diff --git a/be_none.c b/be_none.c index 6ec037ac..688b8daf 100644 --- a/be_none.c +++ b/be_none.c @@ -1,6 +1,6 @@ /* * Linking module for programs that do not support selection of backend - * (such as pscp or pterm). + * (such as pterm). */ #include diff --git a/be_ssh.c b/be_ssh.c new file mode 100644 index 00000000..57d241c2 --- /dev/null +++ b/be_ssh.c @@ -0,0 +1,16 @@ +/* + * Linking module for programs that are restricted to only using SSH + * (pscp and psftp). These do not support selection of backend, but + * must still have a backends[] array mentioning SSH because + * settings.c will want to consult it during session load. + */ + +#include +#include "putty.h" + +const int be_default_protocol = PROT_SSH; + +Backend *backends[] = { + &ssh_backend, + NULL +};