From a45c5a9e1646fbc675410638c276e204207b151a Mon Sep 17 00:00:00 2001 From: Andrew Lukoshko Date: Tue, 16 Jan 2024 15:45:52 +0100 Subject: [PATCH] Explicitly cache remote users --- ...ttings-Explicitly-cache-remote-users.patch | 45 +++++++++++++++++++ gdm.spec | 8 +++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 0001-session-settings-Explicitly-cache-remote-users.patch diff --git a/0001-session-settings-Explicitly-cache-remote-users.patch b/0001-session-settings-Explicitly-cache-remote-users.patch new file mode 100644 index 0000000..b5da396 --- /dev/null +++ b/0001-session-settings-Explicitly-cache-remote-users.patch @@ -0,0 +1,45 @@ +From cf4664891ede9648d096569900e8b95abd91a633 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Thu, 7 Apr 2022 12:44:10 -0400 +Subject: [PATCH] session-settings: Explicitly cache remote users + +Right now a user's cache file won't get written out if they are logging +in with entirely default settings. + +This means remote users have to type in their usernames manually until +they change their session. + +This commit explicitly caches remote users. + +Closes: https://gitlab.gnome.org/GNOME/gdm/-/issues/743 +--- + daemon/gdm-session-settings.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/daemon/gdm-session-settings.c b/daemon/gdm-session-settings.c +index 5b64cb65b..ef5d72e7f 100644 +--- a/daemon/gdm-session-settings.c ++++ b/daemon/gdm-session-settings.c +@@ -406,6 +406,19 @@ gdm_session_settings_save (GdmSessionSettings *settings, + if (settings->priv->language_name != NULL) { + act_user_set_language (user, settings->priv->language_name); + } ++ ++ if (!act_user_is_local_account (user)) { ++ g_autoptr (GError) error = NULL; ++ ++ act_user_manager_cache_user (settings->priv->user_manager, username, &error); ++ ++ if (error != NULL) { ++ g_debug ("GdmSessionSettings: Could not locally cache remote user: %s", error->message); ++ g_object_unref (user); ++ return FALSE; ++ } ++ ++ } + g_object_unref (user); + + return TRUE; +-- +GitLab + diff --git a/gdm.spec b/gdm.spec index 30a8d20..d8bf536 100644 --- a/gdm.spec +++ b/gdm.spec @@ -11,7 +11,7 @@ Name: gdm Epoch: 1 Version: 40.1 -Release: 23%{?dist} +Release: 24%{?dist} Summary: The GNOME Display Manager License: GPLv2+ @@ -45,6 +45,8 @@ Patch70001: 0001-manager-Fix-btmp-record-accounting.patch Patch80001: 0001-gdm-session-Force-reuse-vt-mode-for-legacy-Xorg-mode.patch +Patch80002: 0001-session-settings-Explicitly-cache-remote-users.patch + # Latest udev rules and support code Patch90001: 0001-local-display-factory-Stall-startup-until-main-graph.patch Patch90002: 0002-common-Add-API-to-reload-settings-from-disk.patch @@ -353,6 +355,10 @@ dconf update || : %{_libdir}/pkgconfig/gdm-pam-extensions.pc %changelog +* Tue Jan 16 2024 Andrew Lukoshko - 40.1-24 +- Explicitly cache remote users + Resolves: RHEL-21791 + * Fri Dec 15 2023 Ray Strode - 40.1-23 - Make /var/log/gdm tmpfiles.d snippet match files manifest to fix installability test