diff options
author | Ray Strode <rstrode@redhat.com> | 2023-04-19 11:22:29 -0400 |
---|---|---|
committer | Ray Strode <halfline@gmail.com> | 2023-04-19 17:26:22 +0000 |
commit | ea88bc6ab047117b989c624d6374396e06699b50 (patch) | |
tree | 48a58a120a282a12175c0fdf69153338063b38a5 | |
parent | b450a4420257fc9d01a6a842d14d3a4a7b32d77b (diff) | |
download | accountsservice-ea88bc6ab047117b989c624d6374396e06699b50.tar.gz |
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
-rw-r--r-- | src/daemon.c | 8 |
1 files 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 |