1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -05:00

Merge recent misc fixes from 'pre-0.77'.

This commit is contained in:
Jacob Nevins
2022-05-19 10:57:35 +01:00
18 changed files with 108 additions and 19 deletions

View File

@ -67,8 +67,13 @@ static bool plink_eof(Seat *seat)
static SeatPromptResult plink_get_userpass_input(Seat *seat, prompts_t *p)
{
/* Plink doesn't support Restart Session, so we can just have a
* single static cmdline_get_passwd_input_state that's never reset */
static cmdline_get_passwd_input_state cmdline_state =
CMDLINE_GET_PASSWD_INPUT_STATE_INIT;
SeatPromptResult spr;
spr = cmdline_get_passwd_input(p);
spr = cmdline_get_passwd_input(p, &cmdline_state, false);
if (spr.kind == SPRK_INCOMPLETE)
spr = console_get_userpass_input(p);
return spr;

View File

@ -14,8 +14,14 @@
SeatPromptResult filexfer_get_userpass_input(Seat *seat, prompts_t *p)
{
/* The file transfer tools don't support Restart Session, so we
* can just have a single static cmdline_get_passwd_input_state
* that's never reset */
static cmdline_get_passwd_input_state cmdline_state =
CMDLINE_GET_PASSWD_INPUT_STATE_INIT;
SeatPromptResult spr;
spr = cmdline_get_passwd_input(p);
spr = cmdline_get_passwd_input(p, &cmdline_state, false);
if (spr.kind == SPRK_INCOMPLETE)
spr = console_get_userpass_input(p);
return spr;

View File

@ -131,6 +131,8 @@ static int kbd_codepage;
static Ldisc *ldisc;
static Backend *backend;
static cmdline_get_passwd_input_state cmdline_get_passwd_state;
static struct unicode_data ucsdata;
static bool session_closed;
static bool reconfiguring = false;
@ -366,6 +368,8 @@ static void start_backend(void)
char *error, *realhost;
int i;
cmdline_get_passwd_state = cmdline_get_passwd_input_state_new;
vt = backend_vt_from_conf(conf);
seat_set_trust_status(&wgs.seat, true);
@ -5860,7 +5864,7 @@ static bool win_seat_eof(Seat *seat)
static SeatPromptResult win_seat_get_userpass_input(Seat *seat, prompts_t *p)
{
SeatPromptResult spr;
spr = cmdline_get_passwd_input(p);
spr = cmdline_get_passwd_input(p, &cmdline_get_passwd_state, true);
if (spr.kind == SPRK_INCOMPLETE)
spr = term_get_userpass_input(term, p);
return spr;