[gdm/multi-stack-async-stop: 25/37] Initiate smart card auth when clicking on it in list
- From: Ray Strode <halfline src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gdm/multi-stack-async-stop: 25/37] Initiate smart card auth when clicking on it in list
- Date: Thu, 30 Jul 2009 13:50:51 +0000 (UTC)
commit 7643db3623d28426893d7648ff65e3f030339c5d
Author: Ray Strode <rstrode redhat com>
Date: Fri Feb 27 15:44:13 2009 -0500
Initiate smart card auth when clicking on it in list
gui/simple-greeter/gdm-greeter-login-window.c | 24 ++++++++++++++++++++
.../plugins/smartcard/gdm-smartcard-extension.c | 2 +-
2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
index 3f4c031..782cee8 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -803,6 +803,7 @@ reset_dialog (GdmGreeterLoginWindow *login_window)
set_message (login_window, "");
switch_mode (login_window, MODE_SELECTION);
+ gtk_widget_set_sensitive (login_window->priv->conversation_list, TRUE);
set_sensitive (login_window, TRUE);
set_ready (login_window);
set_focus (GDM_GREETER_LOGIN_WINDOW (login_window));
@@ -1632,6 +1633,7 @@ static void
on_user_chooser_activated (GdmUserChooserWidget *user_chooser,
GdmGreeterLoginWindow *login_window)
{
+ char *user_name;
char *item_id;
user_name = gdm_user_chooser_widget_get_chosen_user_name (GDM_USER_CHOOSER_WIDGET (login_window->priv->user_chooser));
@@ -1665,6 +1667,28 @@ on_user_chooser_activated (GdmUserChooserWidget *user_chooser,
set_log_in_button_mode (login_window, LOGIN_BUTTON_TIMED_LOGIN);
set_message (login_window, _("Select language and click Log In"));
g_free (item_id);
+ } else {
+ GdmTask *task;
+
+ task = gdm_task_list_foreach_task (GDM_TASK_LIST (login_window->priv->conversation_list),
+ (GdmTaskListForeachFunc)
+ task_has_service_name,
+ (gpointer) item_id);
+
+ if (task == NULL) {
+ g_debug ("GdmGreeterLoginWindow: %s has no task associated with it", item_id);
+ g_free (item_id);
+ return;
+ }
+ g_debug ("GdmGreeterLoginWindow: Beginning auth conversation for item %s", item_id);
+
+ /* FIXME: we should probably give the plugin more say for
+ * what happens here.
+ */
+ g_signal_emit (login_window, signals[BEGIN_VERIFICATION], 0, item_id);
+ g_free (item_id);
+
+ gtk_widget_set_sensitive (login_window->priv->conversation_list, FALSE);
}
g_debug ("GdmGreeterLoginWindow: Switching to shrunken authentication mode");
diff --git a/gui/simple-greeter/plugins/smartcard/gdm-smartcard-extension.c b/gui/simple-greeter/plugins/smartcard/gdm-smartcard-extension.c
index ed19e62..d3641ba 100644
--- a/gui/simple-greeter/plugins/smartcard/gdm-smartcard-extension.c
+++ b/gui/simple-greeter/plugins/smartcard/gdm-smartcard-extension.c
@@ -103,7 +103,7 @@ on_smartcard_event (GIOChannel *io_channel,
if (extension->priv->number_of_tokens == 1) {
gdm_conversation_choose_user (GDM_CONVERSATION (extension),
- GDM_CONVERSATION_OTHER_USER);
+ PAMSERVICENAME);
} else if (extension->priv->number_of_tokens == 0) {
gdm_conversation_cancel (GDM_CONVERSATION (extension));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]