simon-git: putty (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sun Oct 24 11:50:06 BST 2021


TL;DR:
  d42f1fe9 Remove 'calling_back' parameter from plug_closing.
  efb65894 Tidy up the comments in PlugVtable.
  53744448 Lowercase version of BackendVtable's displayname.
  f1746d69 Add 'description' methods for Backend and Plug.

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:           2021-10-24 11:50:06

commit d42f1fe96d4a42f94954cf665ba12e6f1317fc62
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=d42f1fe96d4a42f94954cf665ba12e6f1317fc62;hp=b13f3d079b66f25d26179185c65d40b348b4b570
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Oct 23 17:54:21 2021 +0100

    Remove 'calling_back' parameter from plug_closing.
    
    It was totally unused. No implementation of the 'closing' method in a
    Plug vtable was checking it for any reason at all, except for
    ProxySocket which captured it from its client in order to pass on to
    its server (which, perhaps after further iterations of ProxySocket,
    would have ended up ignoring it similarly). And every caller of
    plug_closing set it to 0 (aka false), except for the one in sshproxy.c
    which passed true (but it would have made no difference to anyone).
    
    The comment in network.h refers to a FIXME comment which was in
    try_send() when that code was written (see winnet.c in commit
    7b0e08270058390). That FIXME is long gone, replaced by a use of a
    toplevel callback. So I think the aim must have been to avoid
    re-entrancy when sk_write called try_send which encountered a socket
    error and called back to plug_closing - but that's long since fixed by
    other means now.

 cproxy.c                | 10 ++++-----
 network.h               | 10 ++++-----
 nocproxy.c              |  4 ++--
 nullplug.c              |  3 +--
 otherbackends/raw.c     |  3 +--
 otherbackends/rlogin.c  |  3 +--
 otherbackends/supdup.c  |  3 +--
 otherbackends/telnet.c  |  3 +--
 pageant.c               |  4 ++--
 proxy.c                 | 56 ++++++++++++++++++++++---------------------------
 proxy.h                 |  1 -
 psocks.c                |  4 ++--
 ssh/portfwd.c           |  6 ++----
 ssh/server.c            |  3 +--
 ssh/sesschan.c          |  3 +--
 ssh/sharing.c           |  5 ++---
 ssh/ssh.c               |  3 +--
 ssh/x11fwd.c            |  3 +--
 sshproxy.c              |  4 ++--
 unix/fd-socket.c        |  7 +++----
 unix/network.c          | 10 ++++-----
 unix/pageant.c          |  3 +--
 unix/psusan.c           |  3 +--
 unix/uppity.c           |  3 +--
 windows/handle-socket.c |  6 +++---
 windows/network.c       | 14 ++++++-------
 26 files changed, 76 insertions(+), 101 deletions(-)

commit efb658941160735e298c8b771eab021dd81612c3
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=efb658941160735e298c8b771eab021dd81612c3;hp=d42f1fe96d4a42f94954cf665ba12e6f1317fc62
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Oct 23 18:09:25 2021 +0100

    Tidy up the comments in PlugVtable.
    
    It always confused me that each comment was _after_ the function
    prototype it described, instead of before, which is my usual idiom.
    Reordered everything, and added a blank line between each
    (comment,function) pair to make it clear what goes with what.
    
    While I'm at it, rewrote some of the comments for clarity and whole
    sentences.

 network.h | 48 +++++++++++++++++++++++++++++++-----------------
 1 file changed, 31 insertions(+), 17 deletions(-)

commit 5374444879057ad6f013e57716e49dfd3a10ed6e
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=5374444879057ad6f013e57716e49dfd3a10ed6e;hp=efb658941160735e298c8b771eab021dd81612c3
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Oct 23 18:26:34 2021 +0100

    Lowercase version of BackendVtable's displayname.
    
    The current 'displayname' field is designed for presenting in the
    config UI, so it starts with a capital letter even when it's not a
    proper noun. If I want to name the backend in the middle of a
    sentence, I'll need a version that starts with lowercase where
    appropriate.
    
    The old field is renamed displayname_tc, to avoid ambiguity.

 config.c                 | 4 ++--
 otherbackends/raw.c      | 3 ++-
 otherbackends/rlogin.c   | 3 ++-
 otherbackends/supdup.c   | 3 ++-
 otherbackends/telnet.c   | 3 ++-
 otherbackends/testback.c | 6 ++++--
 putty.h                  | 7 ++++---
 ssh/ssh.c                | 6 ++++--
 unix/plink.c             | 4 ++--
 unix/pty.c               | 3 ++-
 unix/serial.c            | 3 ++-
 windows/conpty.c         | 3 ++-
 windows/plink.c          | 4 ++--
 windows/serial.c         | 3 ++-
 14 files changed, 34 insertions(+), 21 deletions(-)

commit f1746d69b172f8ab196ed52ec1941f374130eb57
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=f1746d69b172f8ab196ed52ec1941f374130eb57;hp=5374444879057ad6f013e57716e49dfd3a10ed6e
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Oct 24 09:18:12 2021 +0100

    Add 'description' methods for Backend and Plug.
    
    These will typically be implemented by objects that are both a Backend
    *and* a Plug, and the two methods will deliver the same results to any
    caller, regardless of which facet of the object is known to that
    caller.
    
    Their purpose is to deliver a user-oriented natural-language
    description of what network connection the object is handling, so that
    it can appear in diagnostic messages.
    
    The messages I specifically have in mind are going to appear in cases
    where proxies require interactive authentication: when PuTTY prompts
    interactively for a password, it will need to explain which *thing*
    it's asking for the password for, and these descriptions are what it
    will use to describe the thing in question.
    
    Each backend is allowed to compose these messages however it thinks
    best. In all cases at present, the description string is constructed
    by the new centralised default_description() function, which takes a
    host name and port number and combines them with the backend's display
    name. But the SSH backend does things a bit differently, because it
    uses the _logical_ host name (the one that goes with the SSH host key)
    rather than the physical destination of the network connection. That
    seems more appropriate when the question it's really helping the user
    to answer is "What host am I supposed to be entering the password for?"
    
    In this commit, no clients of the new methods are introduced. I have a
    draft implementation of actually using it for the purpose I describe
    above, but it needs polishing.

 network.h                   | 22 ++++++++++++++++++++++
 otherbackends/raw.c         | 17 +++++++++++++++++
 otherbackends/rlogin.c      | 17 +++++++++++++++++
 otherbackends/supdup.c      | 17 +++++++++++++++++
 otherbackends/telnet.c      | 17 +++++++++++++++++
 putty.h                     | 27 +++++++++++++++++++++++++++
 ssh/ssh.c                   | 31 +++++++++++++++++++++++++------
 utils/CMakeLists.txt        |  1 +
 utils/default_description.c | 22 ++++++++++++++++++++++
 9 files changed, 165 insertions(+), 6 deletions(-)



More information about the tartarus-commits mailing list