simon-git: putty (master): putty.git

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sun Jan 29 20:37:19 GMT 2017


TL;DR:
  35d6c97 Fix Makefile warning about circular empty.h dependency.
  f864265 Remove the commented-out WINDOWS_ASYNC_AGENT code.
  eb2fe29 Make asynchronous agent_query() requests cancellable.
  4ff2286 Rewrite agent forwarding to serialise requests.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer:      putty.git
Date:           2017-01-29 20:37:19

commit 35d6c97dd733dd258be5ba7e17ec6793a4be79fb
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=35d6c97dd733dd258be5ba7e17ec6793a4be79fb;hp=769ce54734f0359068a72d71bca99da9d5d3555e
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Jan 29 19:42:42 2017 +0000

    Fix Makefile warning about circular empty.h dependency.
    
    In commit be586d53b I made empty.h depend on $(allsources), which
    unfortunately was defined so as to include empty.h. This was harmless,
    because make just ignored the circular dependency, but annoying,
    because it constantly mentioned that it was ignoring it.

 mkfiles.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

commit f864265e393f4279045ca59d7eb9b03352766cde
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=f864265e393f4279045ca59d7eb9b03352766cde;hp=35d6c97dd733dd258be5ba7e17ec6793a4be79fb
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Jan 29 20:24:09 2017 +0000

    Remove the commented-out WINDOWS_ASYNC_AGENT code.
    
    It's been commented out for ages because it never really worked, and
    it's about to become further out of date when I make other changes to
    the agent client code, so it's time to get rid of it before it gets in
    the way.
    
    If and when I do get round to supporting asynchronous agent requests
    on Windows, it's now pretty clear to me that trying to coerce this
    ghastly window-message IPC into the right shape is the wrong way, and
    a better approach will be to make Pageant support a named-pipe based
    alternative transport for its agent connections, and speaking the
    ordinary stream-oriented agent protocol over that. Then Pageant will
    be able to start adding interactive features (like confirmation
    dialogs or on-demand decryption) with freedom to reply to multiple
    simultaneous agent connections in whatever order it finds convenient.

 windows/winpgntc.c | 71 ------------------------------------------------------
 1 file changed, 71 deletions(-)

commit eb2fe29fc975b19a3b3692fced03559e705881d9
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=eb2fe29fc975b19a3b3692fced03559e705881d9;hp=f864265e393f4279045ca59d7eb9b03352766cde
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Jan 29 20:24:15 2017 +0000

    Make asynchronous agent_query() requests cancellable.
    
    Now, instead of returning a boolean indicating whether the query has
    completed or is still pending, agent_query() returns NULL to indicate
    that the query _has_ completed, and if it hasn't, it returns a pointer
    to a context structure representing the pending query, so that the
    latter can be used to cancel the query if (for example) you later
    decide you need to free the thing its callback was using as a context.
    
    This should fix a potential race-condition segfault if you overload an
    agent forwarding channel and then close it abruptly. (Which nobody
    will be doing for sensible purposes, of course! But I ran across this
    while stress-testing other aspects of agent forwarding.)

 Recipe             | 12 ++++++------
 aqsync.c           | 21 +++++++++++++++++++++
 pageant.c          | 34 +++++++++++++---------------------
 putty.h            | 25 ++++++++++++++++++++-----
 ssh.c              | 53 +++++++++++++++++++++++++++++++++++++++++------------
 unix/uxagentc.c    | 50 ++++++++++++++++++++++++++++----------------------
 windows/winpgntc.c | 16 +++++++++++-----
 7 files changed, 140 insertions(+), 71 deletions(-)

commit 4ff22863d895cb7ebfced4cf923a012a614adaa8
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=4ff22863d895cb7ebfced4cf923a012a614adaa8;hp=eb2fe29fc975b19a3b3692fced03559e705881d9
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Jan 29 19:40:38 2017 +0000

    Rewrite agent forwarding to serialise requests.
    
    The previous agent-forwarding system worked by passing each complete
    query received from the input to agent_query() as soon as it was
    ready. So if the remote client were to pipeline multiple requests,
    then Unix PuTTY (in which agent_query() works asynchronously) would
    parallelise them into many _simultaneous_ connections to the real
    agent - and would not track which query went out first, so that if the
    real agent happened to send its replies (to what _it_ thought were
    independent clients) in the wrong order, then PuTTY would serialise
    the replies on to the forwarding channel in whatever order it got
    them, which wouldn't be the order the remote client was expecting.
    
    To solve this, I've done a considerable rewrite, which keeps the
    request stream in a bufchain, and only removes data from the bufchain
    when it has a complete request. Then, if agent_query decides to be
    asynchronous, the forwarding system waits for _that_ agent response
    before even trying to extract the next request's worth of data from
    the bufchain.
    
    As an added bonus (in principle), this gives agent-forwarding channels
    some actual flow control for the first time ever! If a client spams us
    with an endless stream of rapid requests, and never reads its
    responses, then the output side of the channel will run out of window,
    which causes us to stop processing requests until we have space to
    send responses again, which in turn causes us to stop granting extra
    window on the input side, which serves the client right.

 ssh.c              | 198 +++++++++++++++++++++++++++++++++++------------------
 windows/winpgntc.c |   1 +
 2 files changed, 131 insertions(+), 68 deletions(-)



More information about the tartarus-commits mailing list