session-settings: Explicitly cache remote users

This commit is contained in:
eabdullin 2023-12-08 21:00:46 +03:00
parent 8f18944f2f
commit cd982412f9
2 changed files with 52 additions and 1 deletions

View File

@ -0,0 +1,45 @@
From cf4664891ede9648d096569900e8b95abd91a633 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
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

View File

@ -11,7 +11,7 @@
Name: gdm Name: gdm
Epoch: 1 Epoch: 1
Version: 40.1 Version: 40.1
Release: 21%{?dist} Release: 21%{?dist}.alma.1
Summary: The GNOME Display Manager Summary: The GNOME Display Manager
License: GPLv2+ License: GPLv2+
@ -65,6 +65,9 @@ Patch99930001: 0001-data-add-system-dconf-databases-to-gdm-profile.patch
Patch99950001: 0001-data-Disable-network-configuration-on-login-screen.patch Patch99950001: 0001-data-Disable-network-configuration-on-login-screen.patch
# AlmaLinux patches:
Patch999990001: session-settings-Explicitly-cache-remote-users.patch
BuildRequires: accountsservice-devel BuildRequires: accountsservice-devel
BuildRequires: audit-libs-devel >= %{libauditver} BuildRequires: audit-libs-devel >= %{libauditver}
BuildRequires: dconf BuildRequires: dconf
@ -351,6 +354,9 @@ dconf update || :
%{_libdir}/pkgconfig/gdm-pam-extensions.pc %{_libdir}/pkgconfig/gdm-pam-extensions.pc
%changelog %changelog
* Fri Dec 08 2023 Eduard Abdullin <eabdullin@almalinux.org> - 40.1-21.alma.1
- session-settings: Explicitly cache remote users
* Fri Jan 27 2023 Ray Strode <rstrode@redhat.com> - 40.1-21 * Fri Jan 27 2023 Ray Strode <rstrode@redhat.com> - 40.1-21
- Enable IPV6 support - Enable IPV6 support
Resolves: #2165049 Resolves: #2165049