Hello community, here is the log from the commit of package xfce4-session for openSUSE:Factory checked in at 2013-05-02 12:03:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xfce4-session (Old) and /work/SRC/openSUSE:Factory/.xfce4-session.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "xfce4-session" Changes: -------- --- /work/SRC/openSUSE:Factory/xfce4-session/xfce4-session.changes 2013-03-04 17:35:24.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.xfce4-session.new/xfce4-session.changes 2013-05-02 12:03:32.000000000 +0200 @@ -1,0 +2,7 @@ +Mon Apr 29 14:35:05 UTC 2013 - gber@opensuse.org + +- add xfce4-session-avoid-possible-double-free.patch in order to + avoid a possible double free crash (bxo#9709, backported from + upstream git) + +------------------------------------------------------------------- New: ---- xfce4-session-avoid-possible-double-free.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xfce4-session.spec ++++++ --- /var/tmp/diff_new_pack.WQHVdC/_old 2013-05-02 12:03:34.000000000 +0200 +++ /var/tmp/diff_new_pack.WQHVdC/_new 2013-05-02 12:03:34.000000000 +0200 @@ -32,6 +32,8 @@ Patch1: xfce4-session-adapt-session-scripts.patch # PATCH-FIX-UPSTREAM xfce4-session-handle-multiple-interactive-session-save.patch bxo#5379 gber@opensuse.org -- Handle multiple interactive session save correctly (backported from upstream git) Patch2: xfce4-session-handle-multiple-interactive-session-save.patch +# PATCH-FIX-UPSTREAM xfce4-session-avoid-possible-double-free.patch bxo#9709 gber@opensuse.org -- Avoid a possible double free crash (backported from upstream git) +Patch3: xfce4-session-avoid-possible-double-free.patch %if 0%{?suse_version} > 1210 BuildRequires: iceauth %endif @@ -112,6 +114,7 @@ %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build %configure \ ++++++ xfce4-session-avoid-possible-double-free.patch ++++++ Index: xfce4-session-4.10.0/xfce4-session/xfsm-startup.c =================================================================== --- xfce4-session-4.10.0.orig/xfce4-session/xfsm-startup.c +++ xfce4-session-4.10.0/xfce4-session/xfsm-startup.c @@ -864,6 +864,7 @@ xfsm_startup_start_properties (XfsmPrope gint n; const gchar *current_directory; GPid pid; + GError *error = NULL; /* release any possible old resources related to a previous startup */ xfsm_properties_set_default_child_watch (properties); @@ -878,49 +879,34 @@ xfsm_startup_start_properties (XfsmPrope current_directory = xfsm_properties_get_string (properties, SmCurrentDirectory); - /* fork a new process for the application */ -#ifdef HAVE_VFORK - /* vfork() doesn't allow you to do anything but call exec*() or _exit(), - * so if we need to set the working directory, we can't use vfork() */ - if (current_directory == NULL) - pid = vfork (); - else -#endif - pid = fork (); - - /* handle the child process */ - if (pid == 0) + if (!g_spawn_async (current_directory, + argv, NULL, + G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH, + NULL, NULL, + &pid, &error)) { - /* execute the application here */ - if (current_directory) - { - if (chdir (current_directory)) - g_warning ("Unable to chdir to \"%s\": %s", current_directory, strerror (errno)); - } - execvp (argv[0], argv); - _exit (127); - } - - /* cleanup */ - g_strfreev (argv); + g_warning ("Unable to launch \"%s\": %s", + *argv, error->message); + g_error_free (error); + g_strfreev (argv); - /* check if we failed to fork */ - if (G_UNLIKELY (pid < 0)) - { - /* tell the user that we failed to fork */ - perror ("Failed to fork new process"); return FALSE; } + xfsm_verbose ("Launched command \"%s\" with PID %dn", *argv, (gint) pid); + + g_strfreev (argv); + properties->pid = pid; /* set a watch to make sure the child doesn't quit before registering */ - child_watch_data = g_new (XfsmStartupData, 1); + child_watch_data = g_new0 (XfsmStartupData, 1); child_watch_data->manager = g_object_ref (manager); child_watch_data->properties = properties; - g_child_watch_add_full (G_PRIORITY_LOW, properties->pid, - xfsm_startup_child_watch, child_watch_data, - (GDestroyNotify) xfsm_startup_data_free); + child_watch_data->properties->child_watch_id = + g_child_watch_add_full (G_PRIORITY_LOW, properties->pid, + xfsm_startup_child_watch, child_watch_data, + (GDestroyNotify) xfsm_startup_data_free); /* set a timeout -- client must register in a a certain amount of time * or it's assumed to be broken/have issues. */ -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org