[gdm/wip/slave-connection: 13/29] worker: Drop unused reauthentication states



commit e5c2aef0bc0ddcf6c66276aaf94c454ebf908097
Author: Ray Strode <rstrode redhat com>
Date:   Sat Jul 7 10:39:41 2012 -0400

    worker: Drop unused reauthentication states
    
    It's dead code at the moment, and when the worker
    will ultimately support reauthentication, it's going
    to need to do it in a fundamentally different way
    (using a separate, transient worker process rather
    than reusing the one sitting there from login time)
    
    This commit removes the GDM_SESSION_WORKER_STATE_REAUTHENTICATED,
    GDM_SESSION_WORKER_STATE_REAUTHORIZED, and
    GDM_SESSION_WORKER_STATE_REACCREDITED states and associated
    signal handlers.

 daemon/gdm-session-worker.c |   54 +------------------------------------------
 1 files changed, 1 insertions(+), 53 deletions(-)
---
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index b9e3a69..0220483 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -97,10 +97,7 @@ enum {
         GDM_SESSION_WORKER_STATE_ACCREDITED,
         GDM_SESSION_WORKER_STATE_ACCOUNT_DETAILS_SAVED,
         GDM_SESSION_WORKER_STATE_SESSION_OPENED,
-        GDM_SESSION_WORKER_STATE_SESSION_STARTED,
-        GDM_SESSION_WORKER_STATE_REAUTHENTICATED,
-        GDM_SESSION_WORKER_STATE_REAUTHORIZED,
-        GDM_SESSION_WORKER_STATE_REACCREDITED,
+        GDM_SESSION_WORKER_STATE_SESSION_STARTED
 };
 
 struct GdmSessionWorkerPrivate
@@ -2823,49 +2820,6 @@ on_open_session (GdmSessionWorker *worker,
         queue_state_change (worker);
 }
 
-static void
-on_reauthenticate (GdmSessionWorker *worker,
-                   DBusMessage      *message)
-{
-        if (worker->priv->state != GDM_SESSION_WORKER_STATE_SESSION_STARTED) {
-                g_debug ("GdmSessionWorker: ignoring spurious reauthenticate for user while in state %s", get_state_name (worker->priv->state));
-                return;
-        }
-
-        queue_state_change (worker);
-}
-
-static void
-on_reauthorize (GdmSessionWorker *worker,
-                DBusMessage      *message)
-{
-        if (worker->priv->state != GDM_SESSION_WORKER_STATE_REAUTHENTICATED) {
-                g_debug ("GdmSessionWorker: ignoring spurious reauthorize for user while in state %s", get_state_name (worker->priv->state));
-                return;
-        }
-
-        queue_state_change (worker);
-}
-
-static void
-on_refresh_credentials (GdmSessionWorker *worker,
-                        DBusMessage      *message)
-{
-        int error_code;
-
-        if (worker->priv->state != GDM_SESSION_WORKER_STATE_REAUTHORIZED) {
-                g_debug ("GdmSessionWorker: ignoring spurious refreshing credentials for user while in state %s", get_state_name (worker->priv->state));
-                return;
-        }
-
-        g_debug ("GdmSessionWorker: refreshing credentials");
-
-        error_code = pam_setcred (worker->priv->pam_handle, PAM_REFRESH_CRED);
-        if (error_code != PAM_SUCCESS) {
-                g_debug ("GdmSessionWorker: %s", pam_strerror (worker->priv->pam_handle, error_code));
-        }
-}
-
 static DBusHandlerResult
 worker_dbus_handle_message (DBusConnection *connection,
                             DBusMessage    *message,
@@ -2901,12 +2855,6 @@ worker_dbus_handle_message (DBusConnection *connection,
                 on_open_session (worker, message);
         } else if (dbus_message_is_signal (message, GDM_SESSION_DBUS_INTERFACE, "StartProgram")) {
                 on_start_program (worker, message);
-        } else if (dbus_message_is_signal (message, GDM_SESSION_DBUS_INTERFACE, "Reauthenticate")) {
-                on_reauthenticate (worker, message);
-        } else if (dbus_message_is_signal (message, GDM_SESSION_DBUS_INTERFACE, "Reauthorize")) {
-                on_reauthorize (worker, message);
-        } else if (dbus_message_is_signal (message, GDM_SESSION_DBUS_INTERFACE, "RefreshCredentials")) {
-                on_refresh_credentials (worker, message);
         } else if (dbus_message_is_signal (message, GDM_SESSION_DBUS_INTERFACE, "SetEnvironmentVariable")) {
                 on_set_environment_variable (worker, message);
         } else if (dbus_message_is_signal (message, GDM_SESSION_DBUS_INTERFACE, "SetLanguageName")) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]