[gdm] worker: don't report session gone until closed



commit 09358813114e1c16b1ea02d80327e418a1809486
Author: Ray Strode <rstrode redhat com>
Date:   Sat May 5 23:58:35 2012 -0400

    worker: don't report session gone until closed
    
    It's important we don't tell the slave the session
    has exited/died until we've called pam_close_session,
    since the slave reacts to it going way by closing
    down which can result in the worker getting explicitly
    killed before pam_close_session gets called.

 daemon/gdm-session-worker.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 869075b..449e7d1 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -1639,6 +1639,16 @@ session_worker_child_watch (GPid              pid,
                  : WIFSIGNALED (status) ? WTERMSIG (status)
                  : -1);
 
+#ifdef WITH_CONSOLE_KIT
+        if (worker->priv->ckc != NULL) {
+                ck_connector_close_session (worker->priv->ckc, NULL);
+                ck_connector_unref (worker->priv->ckc);
+                worker->priv->ckc = NULL;
+        }
+#endif
+
+        gdm_session_worker_uninitialize_pam (worker, PAM_SUCCESS);
+
         if (WIFEXITED (status)) {
                 int code = WEXITSTATUS (status);
 
@@ -1653,16 +1663,6 @@ session_worker_child_watch (GPid              pid,
                                       num);
         }
 
-#ifdef WITH_CONSOLE_KIT
-        if (worker->priv->ckc != NULL) {
-                ck_connector_close_session (worker->priv->ckc, NULL);
-                ck_connector_unref (worker->priv->ckc);
-                worker->priv->ckc = NULL;
-        }
-#endif
-
-        gdm_session_worker_uninitialize_pam (worker, PAM_SUCCESS);
-
         worker->priv->child_pid = -1;
 }
 



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