|
|
f83012 |
From 1987a539495f38ade3efc561f65b56316080356e Mon Sep 17 00:00:00 2001
|
|
|
f83012 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
f83012 |
Date: Mon, 24 Jun 2019 16:21:59 -0400
|
|
|
f83012 |
Subject: [PATCH 3/3] session-worker: uninitialize pam if worker is killed
|
|
|
f83012 |
|
|
|
f83012 |
Right nowe don't uninitialize pam or switch back to the
|
|
|
f83012 |
starting VT if the worker is killed before the session.
|
|
|
f83012 |
|
|
|
f83012 |
This commit fixes that.
|
|
|
f83012 |
---
|
|
|
f83012 |
daemon/gdm-session-worker.c | 4 ++++
|
|
|
f83012 |
1 file changed, 4 insertions(+)
|
|
|
f83012 |
|
|
|
f83012 |
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
|
|
|
f83012 |
index aa288ac8e..0322037e0 100644
|
|
|
f83012 |
--- a/daemon/gdm-session-worker.c
|
|
|
f83012 |
+++ b/daemon/gdm-session-worker.c
|
|
|
f83012 |
@@ -3552,60 +3552,64 @@ gdm_session_worker_init (GdmSessionWorker *worker)
|
|
|
f83012 |
static void
|
|
|
f83012 |
gdm_session_worker_unwatch_child (GdmSessionWorker *worker)
|
|
|
f83012 |
{
|
|
|
f83012 |
if (worker->priv->child_watch_id == 0)
|
|
|
f83012 |
return;
|
|
|
f83012 |
|
|
|
f83012 |
g_source_remove (worker->priv->child_watch_id);
|
|
|
f83012 |
worker->priv->child_watch_id = 0;
|
|
|
f83012 |
}
|
|
|
f83012 |
|
|
|
f83012 |
|
|
|
f83012 |
static void
|
|
|
f83012 |
gdm_session_worker_finalize (GObject *object)
|
|
|
f83012 |
{
|
|
|
f83012 |
GdmSessionWorker *worker;
|
|
|
f83012 |
|
|
|
f83012 |
g_return_if_fail (object != NULL);
|
|
|
f83012 |
g_return_if_fail (GDM_IS_SESSION_WORKER (object));
|
|
|
f83012 |
|
|
|
f83012 |
worker = GDM_SESSION_WORKER (object);
|
|
|
f83012 |
|
|
|
f83012 |
g_return_if_fail (worker->priv != NULL);
|
|
|
f83012 |
|
|
|
f83012 |
gdm_session_worker_unwatch_child (worker);
|
|
|
f83012 |
|
|
|
f83012 |
if (worker->priv->child_pid > 0) {
|
|
|
f83012 |
gdm_signal_pid (worker->priv->child_pid, SIGTERM);
|
|
|
f83012 |
gdm_wait_on_pid (worker->priv->child_pid);
|
|
|
f83012 |
}
|
|
|
f83012 |
|
|
|
f83012 |
+ if (worker->priv->pam_handle != NULL) {
|
|
|
f83012 |
+ gdm_session_worker_uninitialize_pam (worker, PAM_SUCCESS);
|
|
|
f83012 |
+ }
|
|
|
f83012 |
+
|
|
|
f83012 |
g_clear_object (&worker->priv->user_settings);
|
|
|
f83012 |
g_free (worker->priv->service);
|
|
|
f83012 |
g_free (worker->priv->x11_display_name);
|
|
|
f83012 |
g_free (worker->priv->x11_authority_file);
|
|
|
f83012 |
g_free (worker->priv->display_device);
|
|
|
f83012 |
g_free (worker->priv->display_seat_id);
|
|
|
f83012 |
g_free (worker->priv->hostname);
|
|
|
f83012 |
g_free (worker->priv->username);
|
|
|
f83012 |
g_free (worker->priv->server_address);
|
|
|
f83012 |
g_strfreev (worker->priv->arguments);
|
|
|
f83012 |
g_strfreev (worker->priv->extensions);
|
|
|
f83012 |
|
|
|
f83012 |
g_hash_table_unref (worker->priv->reauthentication_requests);
|
|
|
f83012 |
|
|
|
f83012 |
G_OBJECT_CLASS (gdm_session_worker_parent_class)->finalize (object);
|
|
|
f83012 |
}
|
|
|
f83012 |
|
|
|
f83012 |
GdmSessionWorker *
|
|
|
f83012 |
gdm_session_worker_new (const char *address,
|
|
|
f83012 |
gboolean is_reauth_session)
|
|
|
f83012 |
{
|
|
|
f83012 |
GObject *object;
|
|
|
f83012 |
|
|
|
f83012 |
object = g_object_new (GDM_TYPE_SESSION_WORKER,
|
|
|
f83012 |
"server-address", address,
|
|
|
f83012 |
"is-reauth-session", is_reauth_session,
|
|
|
f83012 |
NULL);
|
|
|
f83012 |
|
|
|
f83012 |
return GDM_SESSION_WORKER (object);
|
|
|
f83012 |
}
|
|
|
f83012 |
--
|
|
|
f83012 |
2.18.1
|
|
|
f83012 |
|