[gdm/multi-stack: 6/17] Initiate smart card auth when clicking on it in li
- From: Ray Strode <halfline src gnome org>
- To: svn-commits-list gnome org
- Subject: [gdm/multi-stack: 6/17] Initiate smart card auth when clicking on it in li
- Date: Tue, 3 Mar 2009 13:31:30 -0500 (EST)
commit 5e5e2a2dd443ed6fad3c7c1402fd6e0d94778708
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 | 21 ++++++++++++++++++++
.../plugins/smartcard/gdm-smartcard-extension.c | 2 +-
2 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
index f46ec78..fcb5267 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -807,6 +807,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));
@@ -1616,6 +1617,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));
@@ -1646,6 +1648,25 @@ 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) {
+ return;
+ }
+
+ /* 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);
}
switch_mode (login_window, MODE_AUTHENTICATION);
diff --git a/gui/simple-greeter/plugins/smartcard/gdm-smartcard-extension.c b/gui/simple-greeter/plugins/smartcard/gdm-smartcard-extension.c
index f09b4e4..8e87db6 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]