From 2b8a9668c341bed31f60e8b98ecc257df76ea163 Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Mon, 20 Oct 2014 00:48:22 +0300 Subject: [PATCH] xfce4-session: backport patch to fix a crash --- .../xfce4-session/allow_slashes.patch | 18 +++++++++++ .../xfce4-session/fix_properties_crash.patch | 32 +++++++++++++++++++ recipes/xfce-base/xfce4-session_4.6.2.bb | 6 ++-- 3 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 recipes/xfce-base/xfce4-session/allow_slashes.patch create mode 100644 recipes/xfce-base/xfce4-session/fix_properties_crash.patch diff --git a/recipes/xfce-base/xfce4-session/allow_slashes.patch b/recipes/xfce-base/xfce4-session/allow_slashes.patch new file mode 100644 index 0000000000..ee1c917e98 --- /dev/null +++ b/recipes/xfce-base/xfce4-session/allow_slashes.patch @@ -0,0 +1,18 @@ +commit e5780aa96ee901a4b6747a8d3c1472e956fee305 +Author: Mike Massonnet +Date: Sun Feb 7 14:39:55 2010 +0100 + + Allow slashes in the application name (bug #3995). + +diff --git a/settings/xfae-model.c b/settings/xfae-model.c +index e7a4b85..dcc6098 100644 +--- a/settings/xfae-model.c ++++ b/settings/xfae-model.c +@@ -629,6 +629,7 @@ xfae_model_add (XfaeModel *model, + file = (n == 0) + ? g_strdup_printf ("%s.desktop", name) + : g_strdup_printf ("%s-%u.desktop", name, n); ++ file = g_strdelimit (file, G_DIR_SEPARATOR_S, '-'); /* not a copy */ + + g_snprintf (relpath, 4096, "%s%s", dir, file); + if (!g_file_test (relpath, G_FILE_TEST_IS_REGULAR)) diff --git a/recipes/xfce-base/xfce4-session/fix_properties_crash.patch b/recipes/xfce-base/xfce4-session/fix_properties_crash.patch new file mode 100644 index 0000000000..04595a143c --- /dev/null +++ b/recipes/xfce-base/xfce4-session/fix_properties_crash.patch @@ -0,0 +1,32 @@ +commit 76b1fea1a36401d8f9de1617e2f7e41348a63292 +Author: Brian J. Tarricone +Date: Sun Oct 18 17:24:44 2009 -0700 + + fix crash when properties are freed in failure handler (bug 5797) + +diff --git a/xfce4-session/xfsm-startup.c b/xfce4-session/xfsm-startup.c +index caa34f2..ddf6ad4 100644 +--- a/xfce4-session/xfsm-startup.c ++++ b/xfce4-session/xfsm-startup.c +@@ -690,6 +690,9 @@ xfsm_startup_child_watch (GPid pid, + xfsm_verbose ("Client Id = %s, PID %d exited with status %d\n", + cwdata->properties->client_id, (gint)pid, status); + ++ cwdata->properties->child_watch_id = 0; ++ cwdata->properties->pid = -1; ++ + starting_properties = xfsm_manager_get_queue (cwdata->manager, XFSM_MANAGER_QUEUE_STARTING_PROPS); + if (g_queue_find (starting_properties, cwdata->properties) != NULL) + { +@@ -698,8 +701,9 @@ xfsm_startup_child_watch (GPid pid, + xfsm_startup_handle_failed_startup (cwdata->properties, cwdata->manager); + } + +- cwdata->properties->child_watch_id = 0; +- cwdata->properties->pid = -1; ++ /* NOTE: cwdata->properties could have been freed by ++ * xfsm_startup_handle_failed_startup() above, so don't try to access ++ * any of its members here. */ + + g_spawn_close_pid (pid); + } diff --git a/recipes/xfce-base/xfce4-session_4.6.2.bb b/recipes/xfce-base/xfce4-session_4.6.2.bb index f7ee613170..a52ce7b1a6 100644 --- a/recipes/xfce-base/xfce4-session_4.6.2.bb +++ b/recipes/xfce-base/xfce4-session_4.6.2.bb @@ -2,13 +2,15 @@ DESCRIPTION = "xfce4-session is a session manager for Xfce 4 Desktop Environment DEPENDS = "libwnck libxfcegui4 libxfce4util dbus iceauth xfce-utils" SECTION = "x11" -PR = "r3" +PR = "r4" inherit xfce46 RDEPENDS_${PN} = "iceauth xfce-utils xinit dbus-x11 libxres" -SRC_URI += "file://0001-no_tips_on_startup.patch;patch=1" +SRC_URI += "file://0001-no_tips_on_startup.patch;patch=1 \ + file://fix_properties_crash.patch;patch=1 \ + file://allow_slashes.patch;patch=1" FILES_${PN} += "${libdir}/xfce4/splash/engines/*.so" FILES_${PN} += "${datadir}/xfce4/tips/*" -- 2.39.2