[gdm/multi-stack: 12/45] Force session reset if all PAM conversations fail
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/multi-stack: 12/45] Force session reset if all PAM conversations fail
- Date: Tue, 27 Apr 2010 19:41:56 +0000 (UTC)
commit 8094d63efe5aacf78b00709baa7ec645919ed09d
Author: Ray Strode <rstrode redhat com>
Date: Sat Feb 7 21:17:49 2009 -0500
Force session reset if all PAM conversations fail
gui/simple-greeter/gdm-greeter-login-window.c | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
index 6becaa0..c411c76 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -693,15 +693,21 @@ reset_dialog (GdmGreeterLoginWindow *login_window)
}
static void
-do_cancel (GdmGreeterLoginWindow *login_window)
+restart_conversations (GdmGreeterLoginWindow *login_window)
{
- /* need to wait for response from backend */
- set_message (login_window, _("Cancelling..."));
set_busy (login_window);
set_sensitive (login_window, FALSE);
g_signal_emit (login_window, signals[CANCELLED], 0);
}
+static void
+do_cancel (GdmGreeterLoginWindow *login_window)
+{
+ /* need to wait for response from backend */
+ set_message (login_window, _("Cancelling..."));
+ restart_conversations (login_window);
+}
+
gboolean
gdm_greeter_login_window_ready (GdmGreeterLoginWindow *login_window,
const char *service_name)
@@ -749,6 +755,16 @@ gdm_greeter_login_window_conversation_stopped (GdmGreeterLoginWindow *login_wind
g_object_unref (task);
}
+ /* If every conversation has failed, then just start over.
+ */
+ task = gdm_task_list_get_active_task (GDM_TASK_LIST (login_window->priv->conversation_list));
+
+ if (!gdm_task_is_enabled (task)) {
+ g_debug ("GdmGreeterLoginWindow: No conversations left, starting over");
+ restart_conversations (login_window);
+ }
+ g_object_unref (task);
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]