Blame SOURCES/0001-session-settings-Fetch-session-from-user-even-if-use.patch

4e44f9
From 8a29f79124f38e2106b263bacb6b5ab4cdb255d0 Mon Sep 17 00:00:00 2001
4e44f9
From: Ray Strode <rstrode@redhat.com>
4e44f9
Date: Wed, 9 Mar 2022 10:46:21 -0500
4e44f9
Subject: [PATCH] session-settings: Fetch session from user even if user isn't
4e44f9
 cached
4e44f9
4e44f9
Now that accountsservice supports session templates, GDM can't assume
4e44f9
that no-cache file means, there's nothing worth reading.
4e44f9
4e44f9
Unfortunately, GDM does exactly that. It bypasses fetching the users
4e44f9
session if it doesn't think the user has one.
4e44f9
4e44f9
This commit removes that no-longer-correct optimization.
4e44f9
---
4e44f9
 daemon/gdm-session-settings.c | 4 ----
4e44f9
 1 file changed, 4 deletions(-)
4e44f9
4e44f9
diff --git a/daemon/gdm-session-settings.c b/daemon/gdm-session-settings.c
4e44f9
index 5b64cb65..fbf6897b 100644
4e44f9
--- a/daemon/gdm-session-settings.c
4e44f9
+++ b/daemon/gdm-session-settings.c
4e44f9
@@ -270,64 +270,60 @@ gdm_session_settings_new (void)
4e44f9
         GdmSessionSettings *settings;
4e44f9
 
4e44f9
         settings = g_object_new (GDM_TYPE_SESSION_SETTINGS,
4e44f9
                                  NULL);
4e44f9
 
4e44f9
         return settings;
4e44f9
 }
4e44f9
 
4e44f9
 gboolean
4e44f9
 gdm_session_settings_is_loaded (GdmSessionSettings  *settings)
4e44f9
 {
4e44f9
         if (settings->priv->user == NULL) {
4e44f9
                 return FALSE;
4e44f9
         }
4e44f9
 
4e44f9
         return act_user_is_loaded (settings->priv->user);
4e44f9
 }
4e44f9
 
4e44f9
 static void
4e44f9
 load_settings_from_user (GdmSessionSettings *settings)
4e44f9
 {
4e44f9
         const char *session_name;
4e44f9
         const char *session_type;
4e44f9
         const char *language_name;
4e44f9
 
4e44f9
         if (!act_user_is_loaded (settings->priv->user)) {
4e44f9
                 g_warning ("GdmSessionSettings: trying to load user settings from unloaded user");
4e44f9
                 return;
4e44f9
         }
4e44f9
 
4e44f9
-        /* if the user doesn't have saved state, they don't have any settings worth reading */
4e44f9
-        if (!act_user_get_saved (settings->priv->user))
4e44f9
-                goto out;
4e44f9
-
4e44f9
         session_type = act_user_get_session_type (settings->priv->user);
4e44f9
         session_name = act_user_get_session (settings->priv->user);
4e44f9
 
4e44f9
         g_debug ("GdmSessionSettings: saved session is %s (type %s)", session_name, session_type);
4e44f9
 
4e44f9
         if (session_type != NULL && session_type[0] != '\0') {
4e44f9
                 gdm_session_settings_set_session_type (settings, session_type);
4e44f9
         }
4e44f9
 
4e44f9
         if (session_name != NULL && session_name[0] != '\0') {
4e44f9
                 gdm_session_settings_set_session_name (settings, session_name);
4e44f9
         }
4e44f9
 
4e44f9
         language_name = act_user_get_language (settings->priv->user);
4e44f9
 
4e44f9
         g_debug ("GdmSessionSettings: saved language is %s", language_name);
4e44f9
         if (language_name != NULL && language_name[0] != '\0') {
4e44f9
                 gdm_session_settings_set_language_name (settings, language_name);
4e44f9
         }
4e44f9
 
4e44f9
 out:
4e44f9
         g_object_notify (G_OBJECT (settings), "is-loaded");
4e44f9
 }
4e44f9
 
4e44f9
 static void
4e44f9
 on_user_is_loaded_changed (ActUser            *user,
4e44f9
                            GParamSpec         *pspec,
4e44f9
                            GdmSessionSettings *settings)
4e44f9
 {
4e44f9
         if (act_user_is_loaded (settings->priv->user)) {
4e44f9
-- 
4e44f9
2.34.1
4e44f9