simon-git: putty (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Fri Feb 7 19:24:06 GMT 2020
TL;DR:
586dc96f Factor out common code from Unix CLI main loops.
231e482f Factor out common code from Windows CLI main loops.
06531c3b Centralise 'no random numbers' stubs into norand.c.
91bb4750 Make the plug_log type code into an enum.
630cac3a Log when a network connection succeeds.
66e6bc4a Move half of sshcommon.c out into sshutils.c.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2020-02-07 19:24:06
commit 586dc96f5ff0d87276ee6ae2eddc06e1482b4b02
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=586dc96f5ff0d87276ee6ae2eddc06e1482b4b02;hp=78974fce896068b099cfc99ac7be27d5fe3bb075
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Feb 7 19:14:32 2020 +0000
Factor out common code from Unix CLI main loops.
Unix Plink, Unix Pageant in server mode, Uppity, and the post-
connection form of PSFTP's command-line reading code all had very
similar loops in them, which run a pollwrapper and mediate between
that, timers, and toplevel callbacks. It's long past time the common
code between all of those became a reusable shared routine.
So, this commit introduces uxcliloop.c, and turns all the previous
copies of basically the same loop into a call to cli_main_loop with
various callback functions to configure the parts that differ.
Recipe | 10 +-
unix/unix.h | 16 ++++
unix/uxcliloop.c | 125 +++++++++++++++++++++++++
unix/uxpgnt.c | 278 ++++++++++++++++++++-----------------------------------
unix/uxplink.c | 244 ++++++++++++++++--------------------------------
unix/uxserver.c | 104 +--------------------
unix/uxsftp.c | 150 ++++++++----------------------
7 files changed, 370 insertions(+), 557 deletions(-)
commit 231e482fd2517a53c28cafc11bf73ccbaa45968a
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=231e482fd2517a53c28cafc11bf73ccbaa45968a;hp=586dc96f5ff0d87276ee6ae2eddc06e1482b4b02
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Feb 7 19:15:13 2020 +0000
Factor out common code from Windows CLI main loops.
There aren't quite as many of these as there are on Unix, but Windows
Plink and PSFTP still share some suspiciously similar-looking code.
Now they're both clients of wincliloop.c.
Recipe | 6 +--
windows/wincliloop.c | 129 ++++++++++++++++++++++++++++++++++++++++++++++
windows/winplink.c | 142 ++++++++++-----------------------------------------
windows/winsftp.c | 138 ++++++++++---------------------------------------
windows/winstuff.h | 8 +++
5 files changed, 194 insertions(+), 229 deletions(-)
commit 06531c3b611b6e22dc61f71c102a3eb75a2dc41e
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=06531c3b611b6e22dc61f71c102a3eb75a2dc41e;hp=231e482fd2517a53c28cafc11bf73ccbaa45968a
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Feb 7 19:17:19 2020 +0000
Centralise 'no random numbers' stubs into norand.c.
This is a small cleanup that removes a couple of copies of some boring
stubs, in favour of having just one copy that you can link against.
Unix Pageant can't currently use this, because it's in a precarious
state of _nearly_ having a random number generator: it links against
sshprng but not sshrand, and only uses it for the randomised keypress
acknowledgments in the GUI askpass prompt. But that means it does use
uxnoise, unlike the truly randomness-free tools.
Recipe | 6 +++---
be_nos_s.c | 15 ---------------
be_nossh.c | 15 ---------------
norand.c | 22 ++++++++++++++++++++++
4 files changed, 25 insertions(+), 33 deletions(-)
commit 91bb47508722ddad02d2126f097bac2b71407ebb
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=91bb47508722ddad02d2126f097bac2b71407ebb;hp=06531c3b611b6e22dc61f71c102a3eb75a2dc41e
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Feb 7 19:17:45 2020 +0000
Make the plug_log type code into an enum.
Those magic numbers have been annoying for ages. Now they have names
that I havea fighting chance of remembering the meanings of.
be_misc.c | 12 ++++++------
network.h | 34 +++++++++++++++++++++-------------
portfwd.c | 4 ++--
proxy.c | 12 ++++++------
raw.c | 2 +-
rlogin.c | 2 +-
sesschan.c | 2 +-
ssh.c | 4 ++--
sshserver.c | 4 ++--
telnet.c | 2 +-
unix/uxnet.c | 9 ++++++---
unix/uxpgnt.c | 2 +-
unix/uxproxy.c | 2 +-
unix/uxserver.c | 2 +-
windows/winnet.c | 8 +++++---
windows/winproxy.c | 2 +-
x11fwd.c | 2 +-
17 files changed, 59 insertions(+), 46 deletions(-)
commit 630cac3aa2793e567b6f49a8d192559faa20a96b
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=630cac3aa2793e567b6f49a8d192559faa20a96b;hp=91bb47508722ddad02d2126f097bac2b71407ebb
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Feb 7 19:18:50 2020 +0000
Log when a network connection succeeds.
Now I've got an enum for PlugLogType, it's easier to add things to it.
We were giving a blow-by-blow account of each connection attempt, and
when it failed, saying what went wrong before we moved on to the next
candidate address, but when one finally succeeded, we never logged
_that_. Now we do.
be_misc.c | 4 ++++
network.h | 4 ++++
nullplug.c | 4 ++--
unix/uxnet.c | 11 +++++++++++
windows/winnet.c | 15 ++++++++++++---
5 files changed, 33 insertions(+), 5 deletions(-)
commit 66e6bc4a7974ab7b68b070c25503b0f973c62349
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=66e6bc4a7974ab7b68b070c25503b0f973c62349;hp=630cac3aa2793e567b6f49a8d192559faa20a96b
Author: Simon Tatham <anakin at pobox.com>
Date: Fri Feb 7 19:19:27 2020 +0000
Move half of sshcommon.c out into sshutils.c.
Like other 'utils' modules, the point is that sshutils.c has no
external dependencies, so it's safe to include in a tool without
requiring you to bring in a cascade of other modules you didn't really
want.
Right now I'm only planning to use this change in an out-of-tree
experiment, but it's harmless to commit the change itself here.
Recipe | 2 +-
sshcommon.c | 117 -----------------------------------------------------
sshutils.c | 131 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 132 insertions(+), 118 deletions(-)
More information about the tartarus-commits
mailing list