accountsservice/accountsservice-assume-gdm.patch
Bjørn Lie 77d5509f5f Accepting request 1095035 from home:dimstar:Factory
- Add accountsservice-assume-gdm.patch: assume gdm when not being
  able to detect the used display manager. This is basically the
  same as was in place before we gained support for multiple DMs
  (boo#1212675).

OBS-URL: https://build.opensuse.org/request/show/1095035
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/accountsservice?expand=0&rev=161
2023-06-24 11:11:19 +00:00

56 lines
1.8 KiB
Diff

From ea88bc6ab047117b989c624d6374396e06699b50 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 19 Apr 2023 11:22:29 -0400
Subject: daemon: Assume GDM for autologin if we can't figure it out from
systemd
Right now we figure out which display manager to configure based on
reading a symlink from systemd.
This isn't full proof though. SELinux security policies may prevent it
from being readable, the system might not be using systemd, etc.
Furthermore, in the case where it fails, we currently don't set a
a GError, which leads to a crash when trying to fetch the error
message.
This commit makes accountsservice fall back to GDM when it can't
figure out what else to do. That way we maintain better backward
compatibility.
https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2450
---
src/daemon.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/daemon.c b/src/daemon.c
index 1ad7be6..92a5c06 100644
--- a/src/daemon.c
+++ b/src/daemon.c
@@ -1803,9 +1803,8 @@ load_autologin (Daemon *daemon,
else if (dm_type == DISPLAY_MANAGER_TYPE_GDM)
return load_autologin_gdm (daemon, name, enabled, error);
- g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, _ ("Unsupported Display Manager"));
-
- return FALSE;
+ /* Default to GDM for backward compatibility */
+ return load_autologin_gdm (daemon, name, enabled, error);
}
static gboolean
@@ -1885,7 +1884,8 @@ save_autologin (Daemon *daemon,
else if (dm_type == DISPLAY_MANAGER_TYPE_GDM)
return save_autologin_gdm (daemon, name, enabled, error);
- return FALSE;
+ /* Default to GDM for backward compatibility */
+ return save_autologin_gdm (daemon, name, enabled, error);
}
gboolean
--
cgit v1.2.1