From f22d442003900ebed2d3322d4c258d73d5c6cc1c Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 25 Sep 2018 08:58:46 +0100 Subject: [PATCH] Fix mishandling of user abort during SSH-1 auth. If the user presses ^C or ^D at an authentication prompt, I meant to handle that by calling ssh_user_close, i.e. treat the closure as being intentionally directed _by_ the user, and hence don't bother putting up a warning box telling the user it had happened. I got this right in ssh2userauth, but in ssh1login I mistakenly called ssh_sw_abort instead. That's what I get for going through all the subtly different session closures in a hurry trying to decide which of five categories each one falls into... --- ssh1login.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ssh1login.c b/ssh1login.c index f676a6eb..d2404fc5 100644 --- a/ssh1login.c +++ b/ssh1login.c @@ -712,7 +712,8 @@ static void ssh1_login_process_queue(PacketProtocolLayer *ppl) } if (!s->userpass_ret) { /* Failed to get a passphrase. Terminate. */ - ssh_sw_abort(s->ppl.ssh, "Unable to authenticate"); + ssh_user_close(s->ppl.ssh, + "User aborted at passphrase prompt"); return; } passphrase = dupstr(s->cur_prompt->prompts[0]->result); @@ -968,7 +969,7 @@ static void ssh1_login_process_queue(PacketProtocolLayer *ppl) * because one was supplied on the command line * which has already failed to work). Terminate. */ - ssh_sw_abort(s->ppl.ssh, "Unable to authenticate"); + ssh_user_close(s->ppl.ssh, "User aborted at password prompt"); return; }