diff --git a/desktop/xfce/addon/xfce4-screensaver/actions.py b/desktop/xfce/addon/xfce4-screensaver/actions.py index c670c54c38..f07dd8ae1c 100644 --- a/desktop/xfce/addon/xfce4-screensaver/actions.py +++ b/desktop/xfce/addon/xfce4-screensaver/actions.py @@ -6,9 +6,11 @@ from pisi.actionsapi import pisitools from pisi.actionsapi import autotools +from pisi.actionsapi import shelltools from pisi.actionsapi import get def setup(): + shelltools.system("patch -Rp1 < 0001-Catch-gs_listener_dbus_init-failures.patch") autotools.configure("--enable-authentication-scheme=pam --enable-locking --enable-pam \ \ --disable-static \ diff --git a/desktop/xfce/addon/xfce4-screensaver/files/0001-Catch-gs_listener_dbus_init-failures.patch b/desktop/xfce/addon/xfce4-screensaver/files/0001-Catch-gs_listener_dbus_init-failures.patch new file mode 100644 index 0000000000..8fb6f8081d --- /dev/null +++ b/desktop/xfce/addon/xfce4-screensaver/files/0001-Catch-gs_listener_dbus_init-failures.patch @@ -0,0 +1,30 @@ +From f596f888a2b6e6598b9d0e4f0200b60e7f9eef64 Mon Sep 17 00:00:00 2001 +From: Shawn Anastasio +Date: Sun, 6 Sep 2020 19:33:12 +0000 +Subject: [PATCH 1/1] Catch gs_listener_dbus_init failures + +In cases where the dbus connection fails, gs_listener_dbus_init +will fail and return FALSE. Previously, this status code was not +checked in the gs_listener constructor, resulting in a silent failure +that eventually resulted in a Segmentation Fault when the listener's +system_connection pointer gets used. + +Add a g_assert to ensure gs_listener_dbus_init succeeds, or bail out +gracefully on failures. +--- + src/gs-listener-dbus.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c +index 6307324..7aebe00 100644 +--- a/src/gs-listener-dbus.c ++++ b/src/gs-listener-dbus.c +@@ -2196,7 +2196,7 @@ gs_listener_init (GSListener *listener) { + #endif + listener->priv->prefs = gs_prefs_new(); + +- gs_listener_dbus_init (listener); ++ g_assert (gs_listener_dbus_init (listener)); + + init_session_id (listener); + diff --git a/desktop/xfce/addon/xfce4-screensaver/pspec.xml b/desktop/xfce/addon/xfce4-screensaver/pspec.xml index 4b561954ca..14c9f185c0 100644 --- a/desktop/xfce/addon/xfce4-screensaver/pspec.xml +++ b/desktop/xfce/addon/xfce4-screensaver/pspec.xml @@ -18,6 +18,9 @@ xfce4-screensaver is a screen saver and locker that aims to have simple, sane, secure defaults and be well integrated with the desktop. https://archive.xfce.org/src/apps/xfce4-screensaver/0.1/xfce4-screensaver-0.1.11.tar.bz2 + + 0001-Catch-gs_listener_dbus_init-failures.patch + xmlto intltool