[gdm/multi-stack: 12/46] 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/46] Force session reset if all PAM conversations fail
- Date: Fri, 26 Mar 2010 13:34:37 +0000 (UTC)
commit fff6336f3198a7159ea0d478821356d54fd463d9
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 a51184f..1b4fdef 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -661,15 +661,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)
@@ -715,6 +721,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]