1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12: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

@ -373,8 +373,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

@ -227,6 +227,8 @@ static void setup_utmp(char *ttyname, char *location)
endutxent();
#if HAVE_UPDWTMPX
/* Reportedly, AIX 5.1 has <utmpx.h> and pututxline(), but no
* updwtmpx(). */
updwtmpx(WTMPX_FILE, &utmp_entry);
#endif

View File

@ -65,8 +65,14 @@ Filename *platform_default_filename(const char *name)
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

@ -160,6 +160,7 @@ struct GtkFrontend {
Ldisc *ldisc;
Backend *backend;
Terminal *term;
cmdline_get_passwd_input_state cmdline_get_passwd_state;
LogContext *logctx;
bool exited;
struct unicode_data ucsdata;
@ -361,7 +362,7 @@ static SeatPromptResult gtk_seat_get_userpass_input(Seat *seat, prompts_t *p)
{
GtkFrontend *inst = container_of(seat, GtkFrontend, seat);
SeatPromptResult spr;
spr = cmdline_get_passwd_input(p);
spr = cmdline_get_passwd_input(p, &inst->cmdline_get_passwd_state, true);
if (spr.kind == SPRK_INCOMPLETE)
spr = term_get_userpass_input(inst->term, p);
return spr;
@ -4551,7 +4552,7 @@ void set_geom_hints(GtkFrontend *inst)
* So instead, I simply avoid setting geometry hints at all on any
* GDK backend other than X11, and hopefully that's a workaround.
*/
#if GTK_CHECK_VERSION(3,0,0)
#if GTK_CHECK_VERSION(3,0,0) && !defined NOT_X_WINDOWS
if (!GDK_IS_X11_DISPLAY(gdk_display_get_default()))
return;
#endif
@ -5150,6 +5151,8 @@ static void start_backend(GtkFrontend *inst)
const struct BackendVtable *vt;
char *error, *realhost;
inst->cmdline_get_passwd_state = cmdline_get_passwd_input_state_new;
vt = select_backend(inst->conf);
seat_set_trust_status(&inst->seat, true);