simon-git: putty (master): Simon Tatham

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Sun Nov 22 15:14:57 GMT 2015


TL;DR:
  42334b6 Remove unused SSL declarations from network.h.
  37cdfdc Tell the truth about DNS lookups in the Event Log.
  bb66e98 Fix a memory leak in uxproxy.c.
  a6e76ae Factor out the back ends' plug log functions.
  3d4d400 Log the setup of proxied network connections.
  297efff In GUI PuTTY, log standard error from local proxy commands.
  7c65b9c Option to log proxy setup diagnostics to the terminal.

Repository:     git://git.tartarus.org/simon/putty.git
On the web:     http://tartarus.org/~simon-git/gitweb/?p=putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2015-11-22 15:14:57

commit 42334b65b0f944f8120893a70370c34181f8b7f2
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=42334b65b0f944f8120893a70370c34181f8b7f2;hp=c4f963ebd71dd07b3c6dcade9a2a9a86a7322519
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Nov 22 12:06:54 2015 +0000

    Remove unused SSL declarations from network.h.
    
    There was a very old plan to flesh this out into an implementation of
    SSLified Telnet, back when it looked as if that might be the winning
    option for encrypted remote login. But SSH won, so that random junk in
    network.h has been sitting around for decades doing nothing useful.

 network.h |   36 ------------------------------------
 1 file changed, 36 deletions(-)

commit 37cdfdcd51e03253501546f6b2fc86f90f073aaa
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=37cdfdcd51e03253501546f6b2fc86f90f073aaa;hp=42334b65b0f944f8120893a70370c34181f8b7f2
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Nov 22 09:58:14 2015 +0000

    Tell the truth about DNS lookups in the Event Log.
    
    We've always had the back-end code unconditionally print 'Looking up
    host' before calling name_lookup. But name_lookup doesn't always do an
    actual lookup - in cases where the connection will be proxied and
    we're configured to let the proxy do the DNS for us, it just calls
    sk_nonamelookup to return a dummy SockAddr with the unresolved name
    still in it. It's better to print a message that varies depending on
    whether we're _really_ doing DNS or not, e.g. so that people can tell
    the difference between DNS failure and proxy misconfiguration.
    
    Hence, those log messages are now generated inside name_lookup(),
    which takes a couple of extra parameters for the purpose - a frontend
    pointer to pass to logevent(), and a reason string so that it can say
    what the hostname it's (optionally) looking up is going to be used
    for. (The latter is intended for possible use in logging subsidiary
    lookups for port forwarding, though  the moment I haven't changed
    the current setup where those connection setups aren't logged in
    detail - we just pass NULL in that situation.)

 network.h |    3 ++-
 portfwd.c |    3 ++-
 proxy.c   |   25 ++++++++++++++++++++++---
 raw.c     |   12 ++----------
 rlogin.c  |   12 ++----------
 ssh.c     |    6 ++----
 telnet.c  |   14 +++-----------
 x11fwd.c  |    3 ++-
 8 files changed, 37 insertions(+), 41 deletions(-)

commit bb66e9870e1d297de502767031563b8f2334cb1c
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=bb66e9870e1d297de502767031563b8f2334cb1c;hp=37cdfdcd51e03253501546f6b2fc86f90f073aaa
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Nov 22 15:02:14 2015 +0000

    Fix a memory leak in uxproxy.c.
    
    We set up a pair of bufchains for the standard input and output
    exchanged with the proxy process, but forgot to clear them when the
    Local_Proxy_Socket is cleaned up.

 unix/uxproxy.c |    2 ++
 1 file changed, 2 insertions(+)

commit a6e76ae453e51e0ed86831e9cb1b883f3c443b2a
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=a6e76ae453e51e0ed86831e9cb1b883f3c443b2a;hp=bb66e9870e1d297de502767031563b8f2334cb1c
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Nov 22 11:49:14 2015 +0000

    Factor out the back ends' plug log functions.
    
    I'm about to want to make a change to all those functions at once, and
    since they're almost identical, it seemed easiest to pull them out
    into a common helper. The new source file be_misc.c is intended to
    contain helper code common to all network back ends (crypto and
    non-crypto, in particular), and initially it contains a
    backend_socket_log() function which is the common part of ssh_log(),
    telnet_log(), rlogin_log() etc.

 Recipe    |    2 +-
 be_misc.c |   36 ++++++++++++++++++++++++++++++++++++
 network.h |   12 ++++++++++++
 raw.c     |   13 ++-----------
 rlogin.c  |   13 ++-----------
 ssh.c     |   37 +++++++++++--------------------------
 telnet.c  |   13 ++-----------
 7 files changed, 66 insertions(+), 60 deletions(-)

commit 3d4d4004e83f19310d90e6341dbf363a47382ec2
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=3d4d4004e83f19310d90e6341dbf363a47382ec2;hp=a6e76ae453e51e0ed86831e9cb1b883f3c443b2a
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Nov 22 12:15:52 2015 +0000

    Log the setup of proxied network connections.
    
    I've defined a new value for the 'int type' parameter passed to
    plug_log(), which proxy sockets will use to pass their backend
    information on how the setup of their proxied connections are going.
    I've implemented support for the new type code in all _nontrivial_
    plug log functions (which, conveniently, are precisely the ones I just
    refactored into backend_socket_log); the ones which just throw all
    their log data away anyway will do that to the new code as well.
    
    We use the new type code to log the DNS lookup and connection setup
    for connecting to a networked proxy, and also to log the exact command
    string sent down Telnet proxy connections (so the user can easily
    debug mistakes in the configured format string) and the exact command
    executed when spawning a local proxy process. (The latter was already
    supported on Windows by a bodgy logging call taking advantage of
    Windows in particular having no front end pointer; I've converted that
    into a sensible use of the new plug_log facility, and done the same
    thing on Unix.)

 be_misc.c          |    5 ++++
 network.h          |    5 ++++
 proxy.c            |   80 +++++++++++++++++++++++++++++++++++++++++++++++++---
 unix/uxproxy.c     |    6 ++++
 windows/winproxy.c |    4 +--
 5 files changed, 93 insertions(+), 7 deletions(-)

commit 297efff30350ddffbc77dd6da4269db87103789c
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=297efff30350ddffbc77dd6da4269db87103789c;hp=3d4d4004e83f19310d90e6341dbf363a47382ec2
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Nov 22 11:50:37 2015 +0000

    In GUI PuTTY, log standard error from local proxy commands.
    
    On both Unix and Windows, we now redirect the local proxy command's
    standard error into a third pipe; data received from that pipe is
    broken up at newlines and logged in the Event Log. So if the proxy
    command emits any error messages in the course of failing to connect
    to something, you now have a fighting chance of finding out what went
    wrong.
    
    This feature is disabled in command-line tools like PSFTP and Plink,
    on the basis that in that situation it seems more likely that the user
    would expect standard-error output to go to the ordinary standard
    error in the ordinary way. Only GUI PuTTY catches it and logs it like
    this, because it either doesn't have a standard error at all (on
    Windows) or is likely to be pointing it at some completely unhelpful
    session log file (under X).

 be_misc.c          |   51 +++++++++++++++++++++++++++++
 network.h          |    2 ++
 unix/uxproxy.c     |   91 ++++++++++++++++++++++++++++++++++++++++++++--------
 windows/winhsock.c |   27 +++++++++++++---
 windows/winnpc.c   |    6 ++--
 windows/winnps.c   |    6 ++--
 windows/winproxy.c |   29 +++++++++++++++--
 7 files changed, 186 insertions(+), 26 deletions(-)

commit 7c65b9c57ab1b98ec21ac217a8892131497a1d0f
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=7c65b9c57ab1b98ec21ac217a8892131497a1d0f;hp=297efff30350ddffbc77dd6da4269db87103789c
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Nov 22 14:33:28 2015 +0000

    Option to log proxy setup diagnostics to the terminal.
    
    It has three settings: on, off, and 'only until session starts'. The
    idea of the last one is that if you use something like 'ssh -v' as
    your proxy command, you probably wanted to see the initial SSH
    connection-setup messages while you were waiting to see if the
    connection would be set up successfully at all, but probably _didn't_
    want a slew of diagnostics from rekeys disrupting your terminal in
    mid-emacs once the session had got properly under way.
    
    Default is off, to avoid startling people used to the old behaviour. I
    wonder if I should have set it more aggressively, though.

 be_misc.c     |   23 +++++++++++++++++++++--
 config.c      |    9 +++++++++
 network.h     |    3 ++-
 putty.h       |    7 ++++---
 raw.c         |   12 ++++++++++--
 rlogin.c      |    3 ++-
 settings.c    |    2 ++
 ssh.c         |    7 ++++++-
 telnet.c      |    6 +++++-
 unix/uxpgnt.c |    2 ++
 10 files changed, 63 insertions(+), 11 deletions(-)



More information about the tartarus-commits mailing list