Accepting request 1096894 from GNOME:Next
OBS-URL: https://build.opensuse.org/request/show/1096894 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/accountsservice?expand=0&rev=163
This commit is contained in:
parent
77d5509f5f
commit
5598426c2e
@ -1,55 +0,0 @@
|
||||
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
|
||||
|
||||
|
@ -4,9 +4,11 @@ Date: Wed Jul 20 16:48:41 2011 +0200
|
||||
|
||||
Use autologin configuration from sysconfig (SUSE-ism)
|
||||
|
||||
diff -Nur accountsservice-23.13.9/src/daemon.c new/src/daemon.c
|
||||
--- accountsservice-23.13.9/src/daemon.c 2023-03-27 21:27:39.000000000 +0200
|
||||
+++ new/src/daemon.c 2023-06-21 16:13:59.459681670 +0200
|
||||
|
||||
Index: accountsservice-23.13.9/src/daemon.c
|
||||
===================================================================
|
||||
--- accountsservice-23.13.9.orig/src/daemon.c
|
||||
+++ accountsservice-23.13.9/src/daemon.c
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "util.h"
|
||||
#include "user.h"
|
||||
@ -15,7 +17,7 @@ diff -Nur accountsservice-23.13.9/src/daemon.c new/src/daemon.c
|
||||
|
||||
#define PATH_PASSWD "passwd"
|
||||
#define PATH_SHADOW "shadow"
|
||||
@@ -1789,6 +1790,43 @@
|
||||
@@ -1789,6 +1790,43 @@ load_autologin_lightdm (Daemon *daemon
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -59,7 +61,16 @@ diff -Nur accountsservice-23.13.9/src/daemon.c new/src/daemon.c
|
||||
gboolean
|
||||
load_autologin (Daemon *daemon,
|
||||
gchar **name,
|
||||
@@ -1819,6 +1857,8 @@
|
||||
@@ -1797,6 +1835,8 @@ load_autologin (Daemon *daemon,
|
||||
{
|
||||
DisplayManagerType dm_type;
|
||||
|
||||
+ return load_autologin_suse (daemon, name, enabled, error);
|
||||
+
|
||||
dm_type = get_current_system_dm_type ();
|
||||
if (dm_type == DISPLAY_MANAGER_TYPE_LIGHTDM)
|
||||
return load_autologin_lightdm (daemon, name, enabled, error);
|
||||
@@ -1819,6 +1859,8 @@ save_autologin_gdm (Daemon *daemon,
|
||||
gboolean result;
|
||||
g_autoptr (GError) local_error = NULL;
|
||||
|
||||
@ -68,7 +79,7 @@ diff -Nur accountsservice-23.13.9/src/daemon.c new/src/daemon.c
|
||||
keyfile = g_key_file_new ();
|
||||
if (!g_key_file_load_from_file (keyfile,
|
||||
PATH_GDM_CUSTOM,
|
||||
@@ -1851,6 +1891,8 @@
|
||||
@@ -1851,6 +1893,8 @@ save_autologin_lightdm (Daemon *dae
|
||||
gboolean result;
|
||||
g_autoptr (GError) local_error = NULL;
|
||||
|
||||
@ -77,9 +88,19 @@ diff -Nur accountsservice-23.13.9/src/daemon.c new/src/daemon.c
|
||||
keyfile = g_key_file_new ();
|
||||
if (!g_key_file_load_from_file (keyfile,
|
||||
PATH_LIGHTDM_CONF,
|
||||
diff -Nur accountsservice-23.13.9/src/gdm-sysconfig.c new/src/gdm-sysconfig.c
|
||||
--- accountsservice-23.13.9/src/gdm-sysconfig.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ new/src/gdm-sysconfig.c 2023-06-21 16:13:59.463681938 +0200
|
||||
@@ -1879,6 +1923,8 @@ save_autologin (Daemon *daemon,
|
||||
{
|
||||
DisplayManagerType dm_type;
|
||||
|
||||
+ return save_autologin_suse (daemon, name, enabled, error);
|
||||
+
|
||||
dm_type = get_current_system_dm_type ();
|
||||
if (dm_type == DISPLAY_MANAGER_TYPE_LIGHTDM)
|
||||
return save_autologin_lightdm (daemon, name, enabled, error);
|
||||
Index: accountsservice-23.13.9/src/gdm-sysconfig.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ accountsservice-23.13.9/src/gdm-sysconfig.c
|
||||
@@ -0,0 +1,484 @@
|
||||
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
|
||||
+ *
|
||||
@ -565,9 +586,10 @@ diff -Nur accountsservice-23.13.9/src/gdm-sysconfig.c new/src/gdm-sysconfig.c
|
||||
+ g_strfreev (lines);
|
||||
+ return result;
|
||||
+}
|
||||
diff -Nur accountsservice-23.13.9/src/gdm-sysconfig.h new/src/gdm-sysconfig.h
|
||||
--- accountsservice-23.13.9/src/gdm-sysconfig.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ new/src/gdm-sysconfig.h 2023-06-21 16:13:59.463681938 +0200
|
||||
Index: accountsservice-23.13.9/src/gdm-sysconfig.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ accountsservice-23.13.9/src/gdm-sysconfig.h
|
||||
@@ -0,0 +1,43 @@
|
||||
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
|
||||
+ *
|
||||
@ -612,10 +634,11 @@ diff -Nur accountsservice-23.13.9/src/gdm-sysconfig.h new/src/gdm-sysconfig.h
|
||||
+G_END_DECLS
|
||||
+
|
||||
+#endif /* __GDM_SYSCONFIG_H */
|
||||
diff -Nur accountsservice-23.13.9/src/meson.build new/src/meson.build
|
||||
--- accountsservice-23.13.9/src/meson.build 2023-03-27 21:27:39.000000000 +0200
|
||||
+++ new/src/meson.build 2023-06-21 16:13:59.463681938 +0200
|
||||
@@ -48,6 +48,8 @@
|
||||
Index: accountsservice-23.13.9/src/meson.build
|
||||
===================================================================
|
||||
--- accountsservice-23.13.9.orig/src/meson.build
|
||||
+++ accountsservice-23.13.9/src/meson.build
|
||||
@@ -48,6 +48,8 @@ libaccounts_generated_dep = declare_depe
|
||||
)
|
||||
|
||||
sources = files(
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 5 03:07:00 UTC 2023 - Xiaoguang Wang <xiaoguang.wang@suse.com>
|
||||
|
||||
- Rebase accountsservice-sysconfig.patch: (boo#1212675 boo#1212973).
|
||||
- Remove accountsservice-assume-gdm.patch: Fixed by new rebasing
|
||||
of accountsservice-sysconfig.patch.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jun 24 10:36:17 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>
|
||||
|
||||
|
@ -35,8 +35,6 @@ Patch0: accountsservice-sysconfig.patch
|
||||
Patch1: accountsservice-filter-suse-accounts.patch
|
||||
# PATCH-FIX-OPENSUSE harden_accounts-daemon.service.patch jsegitz@suse.com -- For details please see https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
|
||||
Patch2: harden_accounts-daemon.service.patch
|
||||
# PATCH-FIX-UPSTREAM accountsservice-assume-gdm.patch boo#1212675 dimstar@opensuse.org -- Assume GDM if not able to detect the right DM
|
||||
Patch3: accountsservice-assume-gdm.patch
|
||||
|
||||
## SLE and Leap only patches start at 1000
|
||||
# PATCH-FEATURE-SLE as-fate318433-prevent-same-account-multi-logins.patch fate#318433 cxiong@suse.com -- prevent multiple simultaneous login.
|
||||
@ -117,7 +115,6 @@ This package contains the Vala bindings for accountservice.
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
# SLE and Leap patches start at 1000
|
||||
%if 0%{?sle_version}
|
||||
|
Loading…
Reference in New Issue
Block a user