raveit65 pushed to mate-desktop (f21). "fix pkexec issues with mate-control-center"
notifications at fedoraproject.org
notifications at fedoraproject.org
Wed Mar 25 23:37:50 UTC 2015
>From 87ee73c418e3265566a003553b8f682f560cfbab Mon Sep 17 00:00:00 2001
From: raveit65 <chat-to-me at raveit.de>
Date: Thu, 26 Mar 2015 00:37:35 +0100
Subject: fix pkexec issues with mate-control-center
diff --git a/mate-desktop.spec b/mate-desktop.spec
index 50a7313..945cbe8 100644
--- a/mate-desktop.spec
+++ b/mate-desktop.spec
@@ -2,7 +2,7 @@ Summary: Shared code for mate-panel, mate-session, mate-file-manager, etc
Name: mate-desktop
License: GPLv2+ and LGPLv2+ and MIT
Version: 1.8.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Source0: http://pub.mate-desktop.org/releases/1.8/%{name}-%{version}.tar.xz
URL: http://mate-desktop.org
@@ -10,6 +10,10 @@ Source1: mate-fedora.gschema.override
Source2: mate-fedora-f20.gschema.override
Source3: mate-fedora-f21.gschema.override
+# rhbz (#972534)
+# https://github.com/mate-desktop/mate-desktop/pull/166
+Patch0: mate-desktop_fix-pkexec-wth-m_c_c.patch
+
BuildRequires: dconf-devel
BuildRequires: desktop-file-utils
BuildRequires: mate-common
@@ -87,6 +91,8 @@ libmatedesktop.
%prep
%setup -q
+%patch0 -p1 -b .pkexec
+
%build
%configure \
--enable-desktop-docs \
@@ -175,6 +181,9 @@ fi
%changelog
+* Wed Mar 25 2015 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.8.2-2
+- fix pkexec issues with mate-control-center, rhbz (#972534)
+
* Fri Mar 13 2015 Wolfgang Ulbrich <chat-to-me at raveit.de> - 1.8.2-1
- update to 1.8.2 release
- fix bogus date in %changelog
diff --git a/mate-desktop_fix-pkexec-wth-m_c_c.patch b/mate-desktop_fix-pkexec-wth-m_c_c.patch
new file mode 100644
index 0000000..6d29449
--- /dev/null
+++ b/mate-desktop_fix-pkexec-wth-m_c_c.patch
@@ -0,0 +1,50 @@
+diff --git a/libmate-desktop/mate-desktop-item.c b/libmate-desktop/mate-desktop-item.c
+index eb004d9..c0ee1da 100644
+--- a/libmate-desktop/mate-desktop-item.c
++++ b/libmate-desktop/mate-desktop-item.c
+@@ -1721,6 +1721,17 @@ make_environment_for_screen (GdkScreen *screen,
+ return retval;
+ }
+
++static void
++dummy_child_watch (GPid pid,
++ gint status,
++ gpointer user_data)
++{
++ /* Nothing, this is just to ensure we don't double fork
++ * and break pkexec:
++ * https://bugzilla.gnome.org/show_bug.cgi?id=675789
++ */
++}
++
+ static int
+ ditem_execute (const MateDesktopItem *item,
+ const char *exec,
+@@ -1749,6 +1760,7 @@ ditem_execute (const MateDesktopItem *item,
+ char *new_exec, *uris, *temp;
+ char *exec_locale;
+ int launched = 0;
++ GPid pid;
+ #ifdef HAVE_STARTUP_NOTIFICATION
+ GdkDisplay *gdkdisplay;
+ SnLauncherContext *sn_context;
+@@ -1957,14 +1969,17 @@ ditem_execute (const MateDesktopItem *item,
+ (do_not_reap_child ? G_SPAWN_DO_NOT_REAP_CHILD : 0) | G_SPAWN_SEARCH_PATH /* flags */,
+ NULL, /* child_setup_func */
+ NULL, /* child_setup_func_data */
+- &ret /* child_pid */,
++ (do_not_reap_child ? &pid : NULL) /* child_pid */,
+ error)) {
+ /* The error was set for us,
+ * we just can't launch this thingie */
+ ret = -1;
+ g_strfreev (real_argv);
+ break;
++ } else if (do_not_reap_child) {
++ g_child_watch_add (pid, dummy_child_watch, NULL);
+ }
++
+ launched ++;
+
+ g_strfreev (real_argv);
+
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/mate-desktop.git/commit/?h=f21&id=87ee73c418e3265566a003553b8f682f560cfbab
More information about the scm-commits
mailing list