simon-git: putty (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Thu Sep 1 20:46:29 BST 2022
TL;DR:
6a1b713e Reorganise the stubs collection.
761df2fc Replace integer context2 encoding in conf_editbox_handler.
a92aeca1 Pass port through to userauth.
eec350c3 New facility, platform_start_subprocess.
1f32a16d userauth: factor out the keyboard-interactive code.
15f097f3 New feature: k-i authentication helper plugins.
b01173c6 Fix cyclic dependency in docs build.
a01deea1 Updates to mksrcarc.sh.
e6f9df92 sbcsgen.pl: handle \r\n line endings.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2022-09-01 20:46:29
commit 6a1b713e135a7db1f57017b5bbbb7fcba365204b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=6a1b713e135a7db1f57017b5bbbb7fcba365204b;hp=d862d8d60dcc5646f4b43c72f05536bfb7cd7f85
Author: Simon Tatham <anakin at pobox.com>
Date: Tue Aug 23 18:57:58 2022 +0100
Reorganise the stubs collection.
I made a specific subdirectory 'stubs' to keep all the link-time stub
modules in, like notiming.c. And I put _one_ run-time stub in it,
namely nullplug.c. But the rest of the runtime stubs went into utils.
I think it's better to keep all the stubs together, so I've moved all
the null*.c in utils into stubs (with the exception of nullstrcmp.c,
which means the 'null' in a different sense). Also, fiddled with the
naming to be a bit more consistent, and stated in the new CMakeLists
the naming policy that distinguishes no-*.c from null-*.c.
CMakeLists.txt | 7 ++++---
stubs/CMakeLists.txt | 30 ++++++++++++++++++++++++++++++
stubs/{nocmdline.c => no-cmdline.c} | 2 +-
stubs/{nogss.c => no-gss.c} | 0
stubs/{noprint.c => no-print.c} | 0
stubs/{norand.c => no-rand.c} | 0
stubs/{noterm.c => no-term.c} | 0
stubs/{notiming.c => no-timing.c} | 2 +-
utils/nullcipher.c => stubs/null-cipher.c | 0
utils/nullkey.c => stubs/null-key.c | 0
utils/null_lp.c => stubs/null-lp.c | 0
utils/nullmac.c => stubs/null-mac.c | 0
stubs/{nullplug.c => null-plug.c} | 0
utils/nullseat.c => stubs/null-seat.c | 0
unix/CMakeLists.txt | 22 +++++++++++-----------
utils/CMakeLists.txt | 5 -----
windows/CMakeLists.txt | 10 +++++-----
17 files changed, 52 insertions(+), 26 deletions(-)
commit 761df2fca63ad4ac2badec4e0d359ae18a94608d
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=761df2fca63ad4ac2badec4e0d359ae18a94608d;hp=6a1b713e135a7db1f57017b5bbbb7fcba365204b
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Aug 24 07:56:45 2022 +0100
Replace integer context2 encoding in conf_editbox_handler.
I was just about to add another ordinary edit box control, and found I
couldn't remember what went in the context2 argument to conf_editbox.
When I looked it up, I realised it was one of those horrid integer
encodings of the form '1 means this, -1 means that, less than -1 means
some parametrised property where the parameter is obtained by negating
the encoded integer'.
Those are always awkward to remember, and worse to extend. So I've
replaced the integer context2 used with conf_editbox_handler with a
pointer to a small struct type in which the types and parameters have
sensible names and are documented.
(To avoid annoying const warnings everywhere, this also meant
extending the 'intorptr' union to have a const void * branch as well
as a 'void *'. Surprised I haven't needed that before. But if I
introduce any more of these parameter structures, it'll come in useful
again.)
config.c | 103 ++++++++++++++++++++++++++++--------------------------
dialog.h | 4 ++-
putty.h | 35 +++++++++++++++++++
unix/config-gtk.c | 4 +--
4 files changed, 93 insertions(+), 53 deletions(-)
commit a92aeca1115cbaa787e5d1e46b9357d922cf2f5b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=a92aeca1115cbaa787e5d1e46b9357d922cf2f5b;hp=761df2fca63ad4ac2badec4e0d359ae18a94608d
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Aug 24 19:21:39 2022 +0100
Pass port through to userauth.
I'm going to want to use it in an upcoming commit, because together
with 'savedhost', it forms the identification of an SSH server (at
least as far as the host key cache is concerned, and therefore it's
appropriate for other uses too).
We were already passing the hostname through for use in user-facing
prompts (not to mention the FQDN version for use in GSSAPI).
ssh/ppl.h | 2 +-
ssh/ssh.c | 3 ++-
ssh/userauth2-client.c | 4 +++-
3 files changed, 6 insertions(+), 3 deletions(-)
commit eec350c38b0ea604a4904538bdba19dcaa37e383
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=eec350c38b0ea604a4904538bdba19dcaa37e383;hp=a92aeca1115cbaa787e5d1e46b9357d922cf2f5b
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Aug 22 18:46:32 2022 +0100
New facility, platform_start_subprocess.
We already have the ability to start a subprocess and hook it up to a
Socket, for running local proxy commands. Now the same facility is
available as an auxiliary feature, so that a backend can start another
subcommand for a different purpose, and make a separate Socket to
communicate with it.
Just like the local proxy system, this facility captures the
subprocess's stderr, and passes it back to the caller via plug_log. To
make that not look silly, I had to add a system where the "proxy:"
prefix on the usual plug_log messages is reconfigurable, and when you
call platform_start_subprocess(), you get to pass the prefix you want
to use in this case.
network.h | 4 ++++
putty.h | 10 ++++++++++
stubs/CMakeLists.txt | 1 +
stubs/null-opener.c | 20 ++++++++++++++++++++
unix/fd-socket.c | 7 +++++++
unix/local-proxy.c | 18 ++++++++++++++++++
unix/platform.h | 1 +
utils/log_proxy_stderr.c | 11 +++++++++--
windows/handle-socket.c | 7 +++++++
windows/local-proxy.c | 18 ++++++++++++++++++
windows/platform.h | 1 +
11 files changed, 96 insertions(+), 2 deletions(-)
commit 1f32a16dc85bb30754f0d8dd2cb1931454cfe20c
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=1f32a16dc85bb30754f0d8dd2cb1931454cfe20c;hp=eec350c38b0ea604a4904538bdba19dcaa37e383
Author: Simon Tatham <anakin at pobox.com>
Date: Mon Aug 22 17:48:22 2022 +0100
userauth: factor out the keyboard-interactive code.
No functional change, but I've pulled the bulk of the k-i setup and
prompting code out of ssh2_userauth_process_queue and into
subroutines, in preparation for wanting to do the same work in more
than one place in the main coroutine's control flow.
ssh/userauth2-client.c | 271 +++++++++++++++++++++++++------------------------
1 file changed, 139 insertions(+), 132 deletions(-)
commit 15f097f3997c3d0f4720423af9b478a66e844e1d
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=15f097f3997c3d0f4720423af9b478a66e844e1d;hp=1f32a16dc85bb30754f0d8dd2cb1931454cfe20c
Author: Simon Tatham <anakin at pobox.com>
Date: Thu Sep 1 19:38:46 2022 +0100
New feature: k-i authentication helper plugins.
In recent months I've had two requests from different people to build
support into PuTTY for automatically handling complicated third-party
auth protocols layered on top of keyboard-interactive - the kind of
thing where you're asked to enter some auth response, and you have to
refer to some external source like a web server to find out what the
right response _is_, which is a pain to do by hand, so you'd prefer it
to be automated in the SSH client.
That seems like a reasonable thing for an end user to want, but I
didn't think it was a good idea to build support for specific
protocols of that kind directly into PuTTY, where there would no doubt
be an ever-lengthening list, and maintenance needed on all of them.
So instead, in collaboration with one of my correspondents, I've
designed and implemented a protocol to be spoken between PuTTY and a
plugin running as a subprocess. The plugin can opt to handle the
keyboard-interactive authentication loop on behalf of the user, in
which case PuTTY passes on all the INFO_REQUEST packets to it, and
lets it make up responses. It can also ask questions of the user if
necessary.
The protocol spec is provided in a documentation appendix. The entire
configuration for the end user consists of providing a full command
line to use as the subprocess.
In the contrib directory I've provided an example plugin written in
Python. It gives a set of fixed responses suitable for getting through
Uppity's made-up k-i system, because that was a reasonable thing I
already had lying around to test against. But it also provides example
code that someone else could pick up and insert their own live
response-provider into the middle of, assuming they were happy with it
being in Python.
config.c | 15 +-
contrib/authplugin-example.py | 287 +++++++++++++++++++++++
doc/CMakeLists.txt | 1 +
doc/authplugin.but | 519 ++++++++++++++++++++++++++++++++++++++++++
doc/config.but | 26 +++
putty.h | 1 +
settings.c | 2 +
ssh.h | 32 +++
ssh/ppl.h | 3 +-
ssh/ssh.c | 6 +-
ssh/userauth2-client.c | 462 +++++++++++++++++++++++++++++++++----
windows/help.h | 1 +
12 files changed, 1309 insertions(+), 46 deletions(-)
commit b01173c6b7f2321ab4514561e4db1eaf34fb3555
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=b01173c6b7f2321ab4514561e4db1eaf34fb3555;hp=15f097f3997c3d0f4720423af9b478a66e844e1d
Author: Simon Tatham <anakin at pobox.com>
Date: Thu Sep 1 19:33:44 2022 +0100
Fix cyclic dependency in docs build.
If Halibut is not available to build the docs, but on the other hand
pre-built man pages already exist (e.g. because you unpacked a source
zip file with them already provided), then docs/CMakeLists.txt creates
a set of build rules that copy the pre-built man pages from the source
directory to the build directory.
However, if the source and build directories are the _same_, this
creates a set of cyclic dependencies, i.e. files which depend directly
on themselves. Some build tools (in particular 'ninja') will report
this as an error.
In that situation, the simple fix is to leave off the build rules
completely: if the man pages are already where the build will want
them to end up, there need not be any build rule to do anything about
them.
doc/CMakeLists.txt | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
commit a01deea1b15e98b3c77c24f4faa1d9e439094acd
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=a01deea1b15e98b3c77c24f4faa1d9e439094acd;hp=b01173c6b7f2321ab4514561e4db1eaf34fb3555
Author: Simon Tatham <anakin at pobox.com>
Date: Thu Sep 1 19:35:42 2022 +0100
Updates to mksrcarc.sh.
.dsp and .dsw files are no longer provided in the source archive (they
went out with mkfiles.pl), so there's no need to include an exception
to treat them as binary files.
On the other hand, the source archives _do_ contain a .chm help file
and a .cur mouse pointer image, which _should_ be treated as binary.
(That was a benign omission: Info-Zip detected by itself that the
files were binary, and didn't mangle them. But it did print an
annoying warning, which this commit fixes.)
While I'm here, add .git to the list of version control subdirectories
to exclude.
mksrcarc.sh | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
commit e6f9df92085d9f5679feff8cec6f44588fb44de0
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=e6f9df92085d9f5679feff8cec6f44588fb44de0;hp=a01deea1b15e98b3c77c24f4faa1d9e439094acd
Author: Simon Tatham <anakin at pobox.com>
Date: Thu Sep 1 19:37:17 2022 +0100
sbcsgen.pl: handle \r\n line endings.
These show up if you build from the Windows source archive on Unix,
which is an odd thing to be trying to do, but I managed it myself the
other day by accident :-)
charset/sbcsgen.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
More information about the tartarus-commits
mailing list