[gdm/wip/kill-user-session: 3/3] session-worker: uninitialize pam if worker is killed



commit 7b9835a2c7c7cf245fb7cc31555387bef6300688
Author: Ray Strode <rstrode redhat com>
Date:   Mon Jun 24 16:21:59 2019 -0400

    session-worker: uninitialize pam if worker is killed
    
    Right nowe don't uninitialize pam or switch back to the
    starting VT if the worker is killed before the session.
    
    This commit fixes that.

 daemon/gdm-session-worker.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 584183bc..dfa2e212 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -3548,6 +3548,10 @@ gdm_session_worker_finalize (GObject *object)
 
         g_return_if_fail (worker->priv != NULL);
 
+        if (worker->priv->pam_handle != NULL) {
+                gdm_session_worker_uninitialize_pam (worker, PAM_SUCCESS);
+        }
+
         gdm_session_worker_unwatch_child (worker);
 
         if (worker->priv->child_pid > 0) {


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