simon-git: putty (master): Simon Tatham

Commits to Tartarus CVS repository. tartarus-commits at lists.tartarus.org
Fri Sep 25 12:23:22 BST 2015


TL;DR:
  5a9711a Factor out ssh_share_sockname().
  e0252a4 Factor out ssh_hostport_setup().
  1489299 Actually set the 'got_verstring' flag in sshshare.c!
  7c2ea22 New Plink operating mode: 'plink -shareexists'.
  5133d2a Avoid logging pre-verstring EPIPE from sharing downstreams.

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-09-25 12:23:22

commit 5a9711a1e55786fe3f63e3be413e85844df0b794
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=5a9711a1e55786fe3f63e3be413e85844df0b794;hp=24967601bb59ffd608a46f7667ccff9326f6faf9
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Sep 25 10:58:05 2015 +0100

    Factor out ssh_share_sockname().
    
    This is the part of ssh_connection_sharing_init() which decides on the
    identifying string to pass to the platform sharing setup. I'm about to
    want to use it for another purpose, so it needs to be moved into a
    separate function.

 sshshare.c |   86 +++++++++++++++++++++++++++++++-----------------------------
 1 file changed, 45 insertions(+), 41 deletions(-)

commit e0252a4a609a67db82515e674067d346606c7397
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=e0252a4a609a67db82515e674067d346606c7397;hp=5a9711a1e55786fe3f63e3be413e85844df0b794
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Sep 25 10:58:29 2015 +0100

    Factor out ssh_hostport_setup().
    
    This is the part of ssh.c's connect_to_host() which figures out the
    host name and port number that logically identify the connection -
    i.e. not necessarily where we physically connected to, but what we'll
    use to look up the saved session cache, put in the window title bar,
    and give to the connection sharing code to identify other connections
    to share with.
    
    I'm about to want to use it for another purpose, so it needs to be
    moved out into a separate function.

 ssh.c |   63 +++++++++++++++++++++++++++++++++++++--------------------------
 1 file changed, 37 insertions(+), 26 deletions(-)

commit 14892997d635aaf63d8a9c7630b9bf15389bef04
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=14892997d635aaf63d8a9c7630b9bf15389bef04;hp=e0252a4a609a67db82515e674067d346606c7397
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Sep 25 12:06:06 2015 +0100

    Actually set the 'got_verstring' flag in sshshare.c!
    
    For each connection to a downstream I had a flag indicating that we'd
    sent a version string to that downstream, and one indicating that we'd
    received one in return. But I never actually set the latter to TRUE -
    which was OK, as it turned out, because I never used it for anything
    either.
    
    Now I do want to use it, so I'd better actually set it :-)

 sshshare.c |    1 +
 1 file changed, 1 insertion(+)

commit 7c2ea22784912b65e19027a9a9cf499258179742
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=7c2ea22784912b65e19027a9a9cf499258179742;hp=14892997d635aaf63d8a9c7630b9bf15389bef04
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Sep 25 11:46:28 2015 +0100

    New Plink operating mode: 'plink -shareexists'.
    
    A Plink invocation of the form 'plink -shareexists <session>' tests
    for a currently live connection-sharing upstream for the session in
    question. <session> can be any syntax you'd use with Plink to make the
    actual connection (a host/port number, a bare saved session name,
    -load, whatever).
    
    I envisage this being useful for things like adaptive proxying - e.g.
    if you want to connect to host A which you can't route to directly,
    and you might already have a connection to either of hosts B or C
    which are viable proxies, then you could write a proxy shell script
    which checks whether you already have an upstream for B or C and goes
    via whichever one is currently active.
    
    Testing for the upstream's existence has to be done by actually
    connecting to its socket, because on Unix the mere existence of a
    Unix-domain socket file doesn't guarantee that there's a process
    listening to it. So we make a test connection, and then immediately
    disconnect; hence, that shows up in the upstream's event log.

 putty.h            |    3 +++
 raw.c              |    1 +
 rlogin.c           |    1 +
 ssh.c              |   14 ++++++++++++++
 ssh.h              |    1 +
 sshshare.c         |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 telnet.c           |    1 +
 testback.c         |    4 ++--
 unix/uxplink.c     |   16 ++++++++++++++++
 unix/uxpty.c       |    1 +
 unix/uxser.c       |    1 +
 windows/winplink.c |   16 ++++++++++++++++
 windows/winser.c   |    1 +
 13 files changed, 107 insertions(+), 2 deletions(-)

commit 5133d2a133671a9236afc710cfe3da80e4c39363
web diff http://tartarus.org/~simon-git/gitweb/?p=putty.git;a=commitdiff;h=5133d2a133671a9236afc710cfe3da80e4c39363;hp=7c2ea22784912b65e19027a9a9cf499258179742
Author: Simon Tatham <anakin at pobox.com>
Date:   Fri Sep 25 12:05:55 2015 +0100

    Avoid logging pre-verstring EPIPE from sharing downstreams.
    
    If you use the new 'plink -shareexists' feature, then on Unix at least
    it's possible for the upstream to receive EPIPE, because the
    downstream makes a test connection and immediately closes it, so that
    upstream fails to write its version string.
    
    This looks a bit ugly in the upstream's Event Log, so I'm making a
    special case: an error of 'broken pipe' type, which occurs on a socket
    from a connection sharing downstream, before we've received a version
    string from that downstream, is treated as an unusual kind of normal
    connection termination and not logged as an error.

 sshshare.c         |   23 +++++++++++++++++++++--
 unix/unix.h        |    2 ++
 windows/winstuff.h |    2 ++
 3 files changed, 25 insertions(+), 2 deletions(-)



More information about the tartarus-commits mailing list