1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

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.)
This commit is contained in:
Simon Tatham
2023-04-29 11:34:08 +01:00
parent 62b69a4f16
commit fe63b5d57e
4 changed files with 24 additions and 0 deletions

View File

@ -924,6 +924,8 @@ int main(int argc, char **argv)
ci->ssc.stunt_allow_trivial_ki_auth = true;
} else if (!strcmp(arg, "--return-success-to-pubkey-offer")) {
ci->ssc.stunt_return_success_to_pubkey_offer = true;
} else if (!strcmp(arg, "--close-after-banner")) {
ci->ssc.stunt_close_after_banner = true;
} else {
fprintf(stderr, "%s: unrecognised option '%s'\n", appname, arg);
exit(1);