Bugfix: Fixes #316, logonui - validate default session

This commit is contained in:
Rory Fewell
2024-06-06 21:15:05 +01:00
parent da7a18c76b
commit befecbf114
8 changed files with 201 additions and 77 deletions

View File

@@ -791,6 +791,8 @@ static gboolean on_timeout_delay_done(
{
WinTCWelcomeUI* welcome_ui = WINTC_WELCOME_UI(user_data);
GError* error = NULL;
switch (welcome_ui->current_state)
{
case WINTC_GINA_STATE_STARTING:
@@ -802,9 +804,21 @@ static gboolean on_timeout_delay_done(
break;
case WINTC_GINA_STATE_LAUNCHING:
wintc_gina_logon_session_finish(
welcome_ui->logon_session
);
if (
!wintc_gina_logon_session_finish(
welcome_ui->logon_session,
&error
)
)
{
wintc_nice_error_and_clear(&error);
wintc_welcome_ui_change_state(
welcome_ui,
WINTC_GINA_STATE_PROMPT
);
}
break;
default:

View File

@@ -1026,28 +1026,27 @@ static void on_self_adjustment_changed(
static void on_logon_session_attempt_complete(
WINTC_UNUSED(WinTCGinaLogonSession* logon_session),
WinTCGinaResponse response,
WINTC_UNUSED(WinTCGinaResponse response),
gpointer user_data
)
{
WinTCWelcomeUserList* user_list = WINTC_WELCOME_USER_LIST(user_data);
if (response == WINTC_GINA_RESPONSE_FAIL)
{
gtk_entry_set_text(
GTK_ENTRY(user_list->entry_password),
""
);
// Reset the UI state after any logon attempt
//
gtk_entry_set_text(
GTK_ENTRY(user_list->entry_password),
""
);
gtk_widget_set_sensitive(
user_list->button_go,
TRUE
);
gtk_widget_set_sensitive(
user_list->entry_password,
TRUE
);
}
gtk_widget_set_sensitive(
user_list->button_go,
TRUE
);
gtk_widget_set_sensitive(
user_list->entry_password,
TRUE
);
}
static void on_button_go_clicked(