gdm r6019 - in trunk: . daemon



Author: mccann
Date: Sat Mar 15 17:45:10 2008
New Revision: 6019
URL: http://svn.gnome.org/viewvc/gdm?rev=6019&view=rev

Log:
2008-03-15  William Jon McCann  <jmccann redhat com>

	* daemon/gdm-session-direct.c: (session_worker_message):
	* daemon/gdm-session-worker.c: (on_reauthenticate),
	(on_reauthorize), (on_refresh_credentials),
	(worker_dbus_handle_message):
	* daemon/gdm-session-worker.h:
	Add preliminary support to the state machine for
	session unlocking.



Modified:
   trunk/ChangeLog
   trunk/daemon/gdm-session-direct.c
   trunk/daemon/gdm-session-worker.c
   trunk/daemon/gdm-session-worker.h

Modified: trunk/daemon/gdm-session-direct.c
==============================================================================
--- trunk/daemon/gdm-session-direct.c	(original)
+++ trunk/daemon/gdm-session-direct.c	Sat Mar 15 17:45:10 2008
@@ -1049,6 +1049,18 @@
                 return gdm_session_direct_handle_accredited (session, connection, message);
         } else if (dbus_message_is_method_call (message, GDM_SESSION_DBUS_INTERFACE, "AccreditationFailed")) {
                 return gdm_session_direct_handle_accreditation_failed (session, connection, message);
+        } else if (dbus_message_is_method_call (message, GDM_SESSION_DBUS_INTERFACE, "Authenticated")) {
+                return gdm_session_direct_handle_authenticated (session, connection, message);
+        } else if (dbus_message_is_method_call (message, GDM_SESSION_DBUS_INTERFACE, "AuthenticationFailed")) {
+                return gdm_session_direct_handle_authentication_failed (session, connection, message);
+        } else if (dbus_message_is_method_call (message, GDM_SESSION_DBUS_INTERFACE, "Authorized")) {
+                return gdm_session_direct_handle_authorized (session, connection, message);
+        } else if (dbus_message_is_method_call (message, GDM_SESSION_DBUS_INTERFACE, "AuthorizationFailed")) {
+                return gdm_session_direct_handle_authorization_failed (session, connection, message);
+        } else if (dbus_message_is_method_call (message, GDM_SESSION_DBUS_INTERFACE, "Accredited")) {
+                return gdm_session_direct_handle_accredited (session, connection, message);
+        } else if (dbus_message_is_method_call (message, GDM_SESSION_DBUS_INTERFACE, "AccreditationFailed")) {
+                return gdm_session_direct_handle_accreditation_failed (session, connection, message);
         } else if (dbus_message_is_method_call (message, GDM_SESSION_DBUS_INTERFACE, "UsernameChanged")) {
                 return gdm_session_direct_handle_username_changed (session, connection, message);
         } else if (dbus_message_is_method_call (message, GDM_SESSION_DBUS_INTERFACE, "SessionStarted")) {

Modified: trunk/daemon/gdm-session-worker.c
==============================================================================
--- trunk/daemon/gdm-session-worker.c	(original)
+++ trunk/daemon/gdm-session-worker.c	Sat Mar 15 17:45:10 2008
@@ -88,6 +88,9 @@
         GDM_SESSION_WORKER_STATE_ACCREDITED,
         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,
 };
 
 struct GdmSessionWorkerPrivate
@@ -2214,12 +2217,28 @@
 }
 
 static void
+on_reauthenticate (GdmSessionWorker *worker,
+                   DBusMessage      *message)
+{
+        /* FIXME: return error if not in SESSION_STARTED state */
+        queue_state_change (worker);
+}
+
+static void
+on_reauthorize (GdmSessionWorker *worker,
+                DBusMessage      *message)
+{
+        /* FIXME: return error if not in REAUTHENTICATED state */
+        queue_state_change (worker);
+}
+
+static void
 on_refresh_credentials (GdmSessionWorker *worker,
                         DBusMessage      *message)
 {
         int error_code;
 
-        /* FIXME: return error if not in SESSION STARTED state */
+        /* FIXME: return error if not in REAUTHORIZED state */
         g_debug ("GdmSessionWorker: refreshing credentials");
 
         error_code = pam_setcred (worker->priv->pam_handle, PAM_REFRESH_CRED);
@@ -2257,10 +2276,14 @@
                 on_authorize (worker, message);
         } else if (dbus_message_is_signal (message, GDM_SESSION_DBUS_INTERFACE, "EstablishCredentials")) {
                 on_establish_credentials (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, "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")) {

Modified: trunk/daemon/gdm-session-worker.h
==============================================================================
--- trunk/daemon/gdm-session-worker.h	(original)
+++ trunk/daemon/gdm-session-worker.h	Sat Mar 15 17:45:10 2008
@@ -18,8 +18,8 @@
  * 02111-1307, USA.
  */
 
-#ifndef __GDM_SESSION_H
-#define __GDM_SESSION_H
+#ifndef __GDM_SESSION_WORKER_H
+#define __GDM_SESSION_WORKER_H
 
 #include <glib-object.h>
 



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