[arch-commits] Commit in gconf/trunk (4 files)

Jan de Groot jgc at archlinux.org
Wed Oct 31 09:23:22 UTC 2012


    Date: Wednesday, October 31, 2012 @ 05:23:21
  Author: jgc
Revision: 170050

upgpkg: gconf 3.2.5-3

Fix some bugs that upstream fixed upstream. Mainly a use-after-free bug that crashes Banshee

Added:
  gconf/trunk/gconf-dbus-fix-shutdown.patch
  gconf/trunk/gconf-dbus-fix-use-after-free.patch
  gconf/trunk/gsettings-schema-convert-dont-fail.patch
Modified:
  gconf/trunk/PKGBUILD

------------------------------------------+
 PKGBUILD                                 |   13 +++
 gconf-dbus-fix-shutdown.patch            |   34 +++++++++
 gconf-dbus-fix-use-after-free.patch      |   99 +++++++++++++++++++++++++++++
 gsettings-schema-convert-dont-fail.patch |   28 ++++++++
 4 files changed, 173 insertions(+), 1 deletion(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-10-31 09:09:59 UTC (rev 170049)
+++ PKGBUILD	2012-10-31 09:23:21 UTC (rev 170050)
@@ -3,7 +3,7 @@
 
 pkgname=gconf
 pkgver=3.2.5
-pkgrel=2
+pkgrel=3
 pkgdesc="A configuration database system"
 arch=(i686 x86_64)
 license=('LGPL')
@@ -13,11 +13,17 @@
 install=gconf.install
 url="http://www.gnome.org"
 source=(http://ftp.gnome.org/pub/gnome/sources/GConf/3.2/GConf-$pkgver.tar.xz
+        gconf-dbus-fix-use-after-free.patch
+        gconf-dbus-fix-shutdown.patch
+        gsettings-schema-convert-dont-fail.patch
         gconf-merge-schema
         gconfpkg
         gconf-reload.patch
         01_xml-gettext-domain.patch)
 sha256sums=('4ddea9503a212ee126c5b46a0a958fd5484574c3cb6ef2baf38db02e819e58c6'
+            '76c078218e7c3e93691ddd4d7fd9f5c83d4862d0a0406d17b805f3106b50375d'
+            'ddf55a40a260dd00364b32b3200bd8a76e890070ea6267fbfb322907c0946ab2'
+            'be6f084a31229e8edfd6936005c6bb4f2d1548b777df5937923b4702f7a9ac19'
             'ee6b6e6f4975dad13a8c45f1c1f0547a99373bdecdcd6604bfc12965c328a028'
             'bf1928718caa5df2b9e54a13cfd0f15a8fe0e09e86b84385ce023616a114e898'
             '567b78d8b4b4bbcb77c5f134d57bc503c34867fcc6341c0b01716bcaa4a21694'
@@ -25,6 +31,11 @@
 
 build() {
   cd "GConf-$pkgver"
+  # Upstream fixes from git
+  patch -Np1 -i "$srcdir/gconf-dbus-fix-shutdown.patch"
+  patch -Np1 -i "$srcdir/gsettings-schema-convert-dont-fail.patch"
+  patch -Np1 -i "$srcdir/gconf-dbus-fix-use-after-free.patch"
+
   # Patch from fedora - reloads gconf after installing schemas
   patch -Np1 -i "$srcdir/gconf-reload.patch"
   # http://bugzilla.gnome.org/show_bug.cgi?id=568845

Added: gconf-dbus-fix-shutdown.patch
===================================================================
--- gconf-dbus-fix-shutdown.patch	                        (rev 0)
+++ gconf-dbus-fix-shutdown.patch	2012-10-31 09:23:21 UTC (rev 170050)
@@ -0,0 +1,34 @@
+From 39299610083e0e7f9b44e62b7f4e51e89693cf89 Mon Sep 17 00:00:00 2001
+From: Ray Strode <rstrode at redhat.com>
+Date: Tue, 06 Mar 2012 19:39:06 +0000
+Subject: dbus: fix shutdown
+
+gconftool-2 wasn't properly shutting down gconfd, because
+it was trying to do it before connecting to the daemon.
+
+This commit makes sure that we always first try to connect to
+the daemon before asking it to shutdown.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=671490
+---
+diff --git a/gconf/gconf-dbus.c b/gconf/gconf-dbus.c
+index 442a94b..f167fc5 100644
+--- a/gconf/gconf-dbus.c
++++ b/gconf/gconf-dbus.c
+@@ -2483,7 +2483,13 @@ gconf_shutdown_daemon (GError** err)
+ {
+   DBusMessage *message;
+ 
+-  /* Don't want to spawn it if it's already down */
++  /* If we haven't reached out to it yet,
++   * reach out now.
++   */
++  if (global_conn == NULL)
++    gconf_ping_daemon();
++
++  /* But we don't want to spawn it if it's already down */
+   if (global_conn == NULL || !service_running)
+     return;
+   
+--
+cgit v0.9.0.2

Added: gconf-dbus-fix-use-after-free.patch
===================================================================
--- gconf-dbus-fix-use-after-free.patch	                        (rev 0)
+++ gconf-dbus-fix-use-after-free.patch	2012-10-31 09:23:21 UTC (rev 170050)
@@ -0,0 +1,99 @@
+From 84884e9df7ce8c081a1c223c66a799b82545ff1e Mon Sep 17 00:00:00 2001
+From: Milan Crha <mcrha at redhat.com>
+Date: Thu, 18 Oct 2012 20:08:02 +0000
+Subject: gconf-dbus: fix use after free
+
+gconf_engine_get_fuller is accessing freed memory.
+The problem is that it's referencing strings that are owned
+by a D-Bus message, and they go away when the D-Bus message is freed.
+
+This commit addresses the problem by duplicating the strings and
+freeing them later.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=667167
+---
+diff --git a/gconf/gconf-dbus-utils.c b/gconf/gconf-dbus-utils.c
+index 6fd5bfa..92f5980 100644
+--- a/gconf/gconf-dbus-utils.c
++++ b/gconf/gconf-dbus-utils.c
+@@ -569,11 +569,11 @@ gconf_dbus_utils_get_entry_values (DBusMessageIter  *main_iter,
+ 				   gchar           **schema_name_p)
+ {
+   DBusMessageIter  struct_iter;
+-  gchar           *key;
++  const gchar     *key;
+   GConfValue      *value;
+   gboolean         is_default;
+   gboolean         is_writable;
+-  gchar           *schema_name;
++  const gchar     *schema_name;
+ 
+   g_return_val_if_fail (dbus_message_iter_get_arg_type (main_iter) == DBUS_TYPE_STRUCT,
+ 			FALSE);
+@@ -587,7 +587,7 @@ gconf_dbus_utils_get_entry_values (DBusMessageIter  *main_iter,
+   value = utils_get_value (&struct_iter);
+ 
+   dbus_message_iter_next (&struct_iter);
+-  schema_name = (gchar *) utils_get_optional_string (&struct_iter);
++  schema_name = utils_get_optional_string (&struct_iter);
+ 
+   dbus_message_iter_next (&struct_iter);
+   dbus_message_iter_get_basic (&struct_iter, &is_default);
+@@ -596,7 +596,7 @@ gconf_dbus_utils_get_entry_values (DBusMessageIter  *main_iter,
+   dbus_message_iter_get_basic (&struct_iter, &is_writable);
+ 
+   if (key_p)
+-    *key_p = key;
++    *key_p = g_strdup (key);
+ 
+   if (value_p)
+     *value_p = value;
+@@ -604,7 +604,7 @@ gconf_dbus_utils_get_entry_values (DBusMessageIter  *main_iter,
+     gconf_value_free (value);
+ 
+   if (schema_name_p)
+-    *schema_name_p = schema_name;
++    *schema_name_p = g_strdup (schema_name);
+   
+   if (is_default_p)
+     *is_default_p = is_default;
+diff --git a/gconf/gconf-dbus.c b/gconf/gconf-dbus.c
+index f167fc5..5610fcf 100644
+--- a/gconf/gconf-dbus.c
++++ b/gconf/gconf-dbus.c
+@@ -1252,12 +1252,13 @@ gconf_engine_get_fuller (GConfEngine *conf,
+   
+   if (schema_name && schema_name[0] != '/')
+     {
++      g_free (schema_name);
+       schema_name = NULL;
+     }
+   
+   if (schema_name_p)
+-    *schema_name_p = g_strdup (schema_name);
+-  
++    *schema_name_p = schema_name;
++
+   return val;
+ }
+ 
+@@ -2402,7 +2403,7 @@ handle_notify (DBusConnection *connection,
+ 	       GConfEngine *conf2)
+ {
+   GConfEngine *conf;
+-  gchar *key, *schema_name;
++  gchar *key = NULL, *schema_name = NULL;
+   gboolean is_default, is_writable;
+   DBusMessageIter iter;
+   GConfValue *value;
+@@ -2466,6 +2467,8 @@ handle_notify (DBusConnection *connection,
+ 
+   if (value)
+     gconf_value_free (value);
++  g_free (key);
++  g_free (schema_name);
+ 
+   if (!match)
+     return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+--
+cgit v0.9.0.2

Added: gsettings-schema-convert-dont-fail.patch
===================================================================
--- gsettings-schema-convert-dont-fail.patch	                        (rev 0)
+++ gsettings-schema-convert-dont-fail.patch	2012-10-31 09:23:21 UTC (rev 170050)
@@ -0,0 +1,28 @@
+From 02f12f41b031a1c2672e7cf1cb8ebde58288c547 Mon Sep 17 00:00:00 2001
+From: Guido Günther <agx at sigxcpu.org>
+Date: Thu, 23 Feb 2012 20:14:18 +0000
+Subject: gsettings-schema-convert: Don't fail to convert lists without default element
+
+---
+diff --git a/gsettings/gsettings-schema-convert b/gsettings/gsettings-schema-convert
+index a60dc35..913cc83 100755
+--- a/gsettings/gsettings-schema-convert
++++ b/gsettings/gsettings-schema-convert
+@@ -854,11 +854,10 @@ class GConfSchema:
+         # Fix the default value to be parsable by GVariant
+         if self.type == 'list':
+             l = self.default.strip()
+-            if not (l[0] == '[' and l[-1] == ']'):
+-                if not l:
+-                    l = '[]'
+-                else:
+-                    raise GSettingsSchemaConvertException('Cannot parse default list value \'%s\' for key \'%s\'.' % (self.default, self.applyto or self.key))
++            if not l:
++                l = '[]'
++            elif not (l[0] == '[' and l[-1] == ']'):
++                raise GSettingsSchemaConvertException('Cannot parse default list value \'%s\' for key \'%s\'.' % (self.default, self.applyto or self.key))
+             values = l[1:-1].strip()
+             if not values:
+                 self.default = '[]'
+--
+cgit v0.9.0.2




More information about the arch-commits mailing list