From 9e6ac405b6b98293b99febe800fc7618058400bc Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Mon, 7 Oct 2024 20:26:57 +0300 Subject: [PATCH] import gnome-settings-daemon-40.0.1-17.el9 --- ...when-screensaver-service-unavailable.patch | 34 +++++++++++++++++++ SPECS/gnome-settings-daemon.spec | 12 +++++-- 2 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 SOURCES/usb-protection-dont-crash-when-screensaver-service-unavailable.patch diff --git a/SOURCES/usb-protection-dont-crash-when-screensaver-service-unavailable.patch b/SOURCES/usb-protection-dont-crash-when-screensaver-service-unavailable.patch new file mode 100644 index 0000000..2547719 --- /dev/null +++ b/SOURCES/usb-protection-dont-crash-when-screensaver-service-unavailable.patch @@ -0,0 +1,34 @@ +From 466f84d2483c1187a9e5503eebbd18cdf9c15b14 Mon Sep 17 00:00:00 2001 +From: Michael Catanzaro +Date: Fri, 17 Sep 2021 07:39:24 -0500 +Subject: [PATCH] usb-protection: don't crash when screensaver service is + unavailable + +gnome_settings_bus_get_screen_saver_proxy() can return NULL, e.g. when +D-Bus is broken. We need to handle that case. + +Fixes #585 +--- + plugins/usb-protection/gsd-usb-protection-manager.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/plugins/usb-protection/gsd-usb-protection-manager.c b/plugins/usb-protection/gsd-usb-protection-manager.c +index 63a4e0d7..d8705316 100644 +--- a/plugins/usb-protection/gsd-usb-protection-manager.c ++++ b/plugins/usb-protection/gsd-usb-protection-manager.c +@@ -951,6 +951,12 @@ usb_protection_proxy_ready (GObject *source_object, + G_CALLBACK (settings_changed_callback), manager); + + manager->screensaver_proxy = gnome_settings_bus_get_screen_saver_proxy (); ++ if (!manager->screensaver_proxy) { ++ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) ++ g_warning ("Failed to connect to screensaver service: %s", error->message); ++ g_clear_object (&manager->usb_protection); ++ return; ++ } + + get_current_screen_saver_status (manager); + +-- +2.37.1 + diff --git a/SPECS/gnome-settings-daemon.spec b/SPECS/gnome-settings-daemon.spec index 5fa1af3..eaa14d3 100644 --- a/SPECS/gnome-settings-daemon.spec +++ b/SPECS/gnome-settings-daemon.spec @@ -11,7 +11,7 @@ Name: gnome-settings-daemon Version: 40.0.1 -Release: 16%{?dist}.inferit +Release: 17%{?dist}.inferit Summary: The daemon sharing settings from GNOME to GTK+/KDE applications License: GPLv2+ @@ -72,6 +72,7 @@ Patch00002: subscription-manager-support.patch Patch00003: im-module-setting-fix.patch Patch00004: print-notifications-clear-in-stop.patch Patch00005: 0001-power-Respect-the-nothing-power-button-action-for-VM.patch +Patch00006: usb-protection-dont-crash-when-screensaver-service-unavailable.patch # MSVSphere Patch10000: 0001-Updated-Russain-translation.patch @@ -204,8 +205,13 @@ sed -i '/ExecStart=/s/^/#/' $RPM_BUILD_ROOT%{_prefix}/lib/systemd/user/org.gnome %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog -* Wed Apr 03 2024 Arkady L. Shane - 40.0.1-16.inferit -- update subscription patch +* Mon Mar 25 2024 Felipe Borges - 40.0.1-17 +- Fix usb-protection crash when when screensaver service is unavailable + Related: RHEL-19295 + +* Thu Jan 18 2024 Ray Strode - 40.0.1-16 +- Try to start rhsm if it's not already running + Related: RHEL-20449 * Fri Dec 22 2023 Sergey Cherevko - 40.0.1-13.inferit.1 - Removing the 'System Not Registered' notification from GNOME (https://access.redhat.com/solutions/6976776)