Browse Source

import gnome-settings-daemon-3.32.0-16.el8_6.1

c8 imports/c8/gnome-settings-daemon-3.32.0-16.el8_6.1
CentOS Sources 3 months ago
committed by Stepan Oksanichenko
parent
commit
dc45ef016e
  1. 34
      SOURCES/0001-power-Avoid-automatic-logout-in-GDM-greeter.patch
  2. 49
      SOURCES/0002-power-Never-register-sleep-timeout-for-logout-in-GDM.patch
  3. 11
      SPECS/gnome-settings-daemon.spec

34
SOURCES/0001-power-Avoid-automatic-logout-in-GDM-greeter.patch

@ -0,0 +1,34 @@
From 77b52a04c9154a7e7b2434f6c70ba6b4fd84c9f1 Mon Sep 17 00:00:00 2001
From: Benjamin Berg <bberg@redhat.com>
Date: Thu, 15 Oct 2020 15:18:35 +0200
Subject: [PATCH] power: Avoid automatic logout in GDM/greeter
In GDM sessions (greeter, initial-setup), it does not make sense to
automatically logout. This can happen if the system wide default is
changed to default to the "logout" action.
Note that we already use the RUNNING_UNDER_GDM environment variable in
the keyboard plugin currently. So doing this is likely sane, even if we
probably want a more elegant strategy to detect whether we are in a
"login" session.
---
plugins/power/gsd-power-manager.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index e103a8a7..b100ff9e 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -872,6 +872,9 @@ static void
gnome_session_logout (GsdPowerManager *manager,
guint logout_mode)
{
+ if (g_getenv("RUNNING_UNDER_GDM"))
+ return;
+
g_dbus_proxy_call (G_DBUS_PROXY (manager->priv->session),
"Logout",
g_variant_new ("(u)", logout_mode),
--
2.26.2

49
SOURCES/0002-power-Never-register-sleep-timeout-for-logout-in-GDM.patch

@ -0,0 +1,49 @@
From f2cd5fb30892e3868732fca1d38fc15fdb73ec18 Mon Sep 17 00:00:00 2001
From: Benjamin Berg <bberg@redhat.com>
Date: Tue, 27 Oct 2020 10:20:34 +0100
Subject: [PATCH 2/2] power: Never register sleep timeout for logout in GDM
We already suppress logout actions in GDM (10aa1714b05b, power: Avoid
automatic logout in GDM/greeter). However, while this prevents the
action, we may still warn.
Change it so that the corresponding timeouts will never be registered.
Leave the guard in gnome_session_logout but add a warning as we should
never be hitting that code path.
---
plugins/power/gsd-power-manager.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 9f2e858e..ed855b6b 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -872,8 +872,10 @@ static void
gnome_session_logout (GsdPowerManager *manager,
guint logout_mode)
{
- if (g_getenv("RUNNING_UNDER_GDM"))
+ if (g_getenv ("RUNNING_UNDER_GDM")) {
+ g_warning ("Prevented logout from GDM session! This indicates an issue in gsd-power.");
return;
+ }
g_dbus_proxy_call (G_DBUS_PROXY (manager->priv->session),
"Logout",
@@ -1773,6 +1775,13 @@ idle_configure (GsdPowerManager *manager)
timeout_sleep = 0;
}
+ /* don't do any automatic logout if we are in GDM */
+ if (g_getenv ("RUNNING_UNDER_GDM") &&
+ (action_type == GSD_POWER_ACTION_LOGOUT)) {
+ g_debug ("Ignoring sleep timeout with logout action inside GDM");
+ timeout_sleep = 0;
+ }
+
if (timeout_sleep != 0) {
g_debug ("setting up sleep callback %is", timeout_sleep);
--
2.26.2

11
SPECS/gnome-settings-daemon.spec

@ -12,7 +12,7 @@
Name: gnome-settings-daemon
Version: 3.32.0
Release: 16%{?dist}
Release: 16%{?dist}.1
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
License: GPLv2+
@ -120,6 +120,9 @@ Patch50017: 0017-Update-translations.patch
Patch60001: 0001-power-Only-disable-Suspend-Hibernate-actions-inside-.patch
Patch70001: 0001-power-Avoid-automatic-logout-in-GDM-greeter.patch
Patch70002: 0002-power-Never-register-sleep-timeout-for-logout-in-GDM.patch
%description
A daemon to share settings from GNOME to other applications. It also
handles global keybindings, as well as a number of desktop-wide settings.
@ -250,9 +253,13 @@ mkdir $RPM_BUILD_ROOT%{_libdir}/gnome-settings-daemon-3.0/gtk-modules
%{_libdir}/pkgconfig/gnome-settings-daemon.pc
%changelog
* Wed Aug 31 2022 Tomas Popela <tpopela@redhat.com> - 3.32.0-16.el8_6.1
- Prevent automatic logout warning in greeter sessions
- Resolves: #2122964
* Fri Sep 10 2021 Kalev Lember <klember@redhat.com> - 3.32.0-16
- Update pt_BR translations
- Resolves: #1978612
- Resolves: #2003069
* Fri Aug 06 2021 Carlos Garnacho <cgarnach@redhat.com> - 3.32.0-15
- Keep auto-logout working inside VMs

Loading…
Cancel
Save