simon-git: putty (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Sat Apr 29 11:50:30 BST 2023
TL;DR:
fe63b5d5 Uppity: add a stunt mode --close-after-banner.
d6e6919f Packet protocol layers: new 'final_output' method.
99bbbd8d userauth: refactor banner handling.
e8becb45 userauth: ensure banner output is printed when connection closes.
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: 2023-04-29 11:50:30
commit fe63b5d57ebbdef43f0903b21b96b22615fddeb3
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=fe63b5d57ebbdef43f0903b21b96b22615fddeb3;hp=62b69a4f16875e75ece3c06fbe474104c5b5c089
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Apr 29 11:34:08 2023 +0100
Uppity: add a stunt mode --close-after-banner.
A user reported yesterday that PuTTY can fail to print a userauth
banner message if the server sends one and then immediately slams the
connection shut. The first step to fixing this is making a convenient
way to reproduce that server behaviour.
(Apparently the real use case has to do with account expiry - the
server in question presumably doesn't have enough layer violations to
be able to put the text "Your account has expired" into an
SSH_MSG_DISCONNECT, so instead it does the next best thing and sends
it as a userauth banner immediately before disconnection.)
ssh/server.c | 1 +
ssh/server.h | 1 +
ssh/userauth2-server.c | 20 ++++++++++++++++++++
unix/uppity.c | 2 ++
4 files changed, 24 insertions(+)
commit d6e6919f69c29cf4d2a0f19fc1c6eab51ba1ac61
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=d6e6919f69c29cf4d2a0f19fc1c6eab51ba1ac61;hp=fe63b5d57ebbdef43f0903b21b96b22615fddeb3
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Apr 29 11:35:20 2023 +0100
Packet protocol layers: new 'final_output' method.
This is called just before closing the connection, and gives every PPL
one last chance to output anything to the user that it might have
buffered.
No functional change: all implementations so far are trivial, except
that the transport layer passes the call on to its higher
layer (because otherwise nothing would do so).
ssh/common.c | 4 ++++
ssh/connection1.c | 1 +
ssh/connection2.c | 1 +
ssh/login1-server.c | 1 +
ssh/login1.c | 1 +
ssh/ppl.h | 6 ++++++
ssh/ssh.c | 10 ++++++++++
ssh/transport2.c | 10 ++++++++++
ssh/userauth2-client.c | 1 +
ssh/userauth2-server.c | 1 +
10 files changed, 36 insertions(+)
commit 99bbbd8d327e5b8e8dc22657dfcdced02225ad75
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=99bbbd8d327e5b8e8dc22657dfcdced02225ad75;hp=d6e6919f69c29cf4d2a0f19fc1c6eab51ba1ac61
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Apr 29 11:36:13 2023 +0100
userauth: refactor banner handling.
No functional change: I've just pulled out into separate subroutines
the piece of code that process a USERAUTH_BANNER message and append
it to our banner bufchain, and the piece that prints the contents of
the bufchain as user output. This will enable them to be called from
additional places easily.
ssh/userauth2-client.c | 110 +++++++++++++++++++++++++++----------------------
1 file changed, 61 insertions(+), 49 deletions(-)
commit e8becb45b540767c6bf04d20c384340e258cc301
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=e8becb45b540767c6bf04d20c384340e258cc301;hp=99bbbd8d327e5b8e8dc22657dfcdced02225ad75
Author: Simon Tatham <anakin at pobox.com>
Date: Sat Apr 29 11:37:17 2023 +0100
userauth: ensure banner output is printed when connection closes.
This should fix the bug mentioned three commits ago: if an SSH server
sends a userauth banner and then immediately slams the connection
shut (with or without SSH_MSG_DISCONNECT), the banner message should
now be reliably printed to the user, which is important if that's
where the server put its explanation for the disconnection (e.g. "Your
account has expired").
ssh/userauth2-client.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
More information about the tartarus-commits
mailing list