simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Mon Jan 27 20:33:15 GMT 2020


TL;DR:
  2160205a Merge the two low-level portfwd setup systems.
  22350d76 Fix a memory leak in ssh1_channel_close_local.

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-01-27 20:33:15

commit 2160205aee71702b0f73adcd7ef449ca1bae3c8e
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=2160205aee71702b0f73adcd7ef449ca1bae3c8e;hp=600bf247d304fc18c9d6b3ec0d18c609253d52a9
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Jan 27 19:34:15 2020 +0000

    Merge the two low-level portfwd setup systems.
    
    In commit 09954a87c I introduced the portfwdmgr_connect_socket()
    system, which opened a port forwarding given a callback to create the
    Socket itself, with the aim of using it to make forwardings to Unix-
    domain sockets and Windows named pipes (both initially for agent
    forwarding).
    
    But I forgot that a year and a bit ago, in commit 834396170, I already
    introduced a similar low-level system for creating a PortForwarding
    around an unusual kind of socket: the portfwd_raw_new() system, which
    in place of a callback uses a two-phase setup protocol (you create the
    socket in between the two setup calls, and can roll it back if the
    socket can't be created).
    
    There's really no need to have _both_ these systems! So now I'm
    merging them, which is to say, I'm enhancing portfwd_raw_new to have
    the one new feature it needs, and throwing away the newer system
    completely. The new feature is to be able to control the initial state
    of the 'ready' flag: portfwd_raw_new was always used for initiating
    port forwardings in response to an incoming local connection, which
    means you need to start off with ready=false and set it true when the
    other end of the SSH connection sends back OPEN_CONFIRMATION. Now it's
    being used for initiating port forwardings in response to a
    CHANNEL_OPEN, we need to be able to start with ready=true.
    
    This commit reverts 09954a87c24e84dac133a9c29ffaef45f145eeca and its
    followup fix 12aa06ccc98cf8a912eb2ea54f02d234f2f8c173, and simplifies
    the agent_connect system down to a single trivial function that makes
    a Socket given a Plug.

 portfwd.c               | 65 +++++++++++++++----------------------------------
 putty.h                 | 11 ++-------
 sesschan.c              |  4 +--
 ssh.h                   |  5 +---
 ssh1connection-client.c | 19 +++++++--------
 ssh2connection-client.c | 35 ++++++++++++--------------
 unix/uxagentc.c         | 24 +++---------------
 windows/winpgntc.c      | 25 ++++---------------
 8 files changed, 57 insertions(+), 131 deletions(-)

commit 22350d76685fa61c928a75c951e1fe7890817ed9
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=22350d76685fa61c928a75c951e1fe7890817ed9;hp=2160205aee71702b0f73adcd7ef449ca1bae3c8e
Author: Simon Tatham <anakin at pobox.com>
Date:   Mon Jan 27 19:40:58 2020 +0000

    Fix a memory leak in ssh1_channel_close_local.
    
    Leak Sanitiser was kind enough to point this out to me during testing
    of the port forwarding rework: chan_log_close_msg() returns a
    dynamically allocated char *, which the caller is supposed to free.

 ssh1connection.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)



More information about the tartarus-commits mailing list