Fix crash in session-settings related with ActUser

Resolves: https://redhat.atlassian.net/browse/RHEL-240871
This commit is contained in:
Joan Torres Lopez 2026-08-14 12:50:50 +02:00
parent 4558e8814d
commit 168daed8cf
No known key found for this signature in database
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,31 @@
From 5a0c2afd7e2001a848101a8154d38fcf1b092963 Mon Sep 17 00:00:00 2001
From: Ignacio Casal Quinteiro <qignacio@amazon.com>
Date: Fri, 14 Aug 2026 11:43:09 +0200
Subject: [PATCH] gdm-session-settings: keep a ref to the user
The user needs to keep a reference so it stays alive during
the signal emissions in case the manager decides to remove
the user internally.
Part-of: <https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/392>
---
daemon/gdm-session-settings.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/daemon/gdm-session-settings.c b/daemon/gdm-session-settings.c
index 33100a70c..07bb8e26f 100644
--- a/daemon/gdm-session-settings.c
+++ b/daemon/gdm-session-settings.c
@@ -349,7 +349,8 @@ gdm_session_settings_load (GdmSessionSettings *settings,
}
settings->user = act_user_manager_get_user (settings->user_manager,
- username);
+ username);
+ g_object_ref (settings->user);
if (!act_user_is_loaded (settings->user)) {
g_signal_connect (settings->user,
--
2.55.0

View File

@ -81,6 +81,10 @@ Patch: 0001-data-Add-PAM-substack-wrappers-to-prevent-auth-bypas.patch
# https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/374
Patch: 0001-session-Set-GDM_AUTH_SESSION_ID-env-var-for-PAM-conversations.patch
# RHEL-240871
# https://gitlab.gnome.org/GNOME/gdm/-/merge_requests/392
Patch: 0001-gdm-session-settings-keep-a-ref-to-the-user.patch
BuildRequires: dconf
BuildRequires: desktop-file-utils
BuildRequires: gettext-devel