From bc334814668105f72c549f0a9dae8ae85b7aeac4 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Dec 14 2009 19:13:45 +0000 Subject: Avoid a gconftool-2 crash --- diff --git a/GConf2.spec b/GConf2.spec index 8f4bf1a..fbf09ea 100644 --- a/GConf2.spec +++ b/GConf2.spec @@ -7,7 +7,7 @@ Summary: A process-transparent configuration system Name: GConf2 Version: 2.28.0 -Release: 1%{?dist} +Release: 3%{?dist} License: LGPLv2+ Group: System Environment/Base Source: http://download.gnome.org/sources/GConf/2.28/GConf-%{version}.tar.bz2 @@ -38,6 +38,8 @@ Conflicts: GConf2-dbus Patch0: GConf-2.18.0.1-reload.patch # http://bugzilla.gnome.org/show_bug.cgi?id=568845 Patch1: GConf-gettext.patch +# +Patch2: no-access-crash.patch %description @@ -75,6 +77,7 @@ which require GTK+. %setup -q -n GConf-%{version} %patch0 -p1 -b .reload %patch1 -p1 -b .gettext +%patch2 -p1 -b .no-access autoreconf -f -i @@ -151,6 +154,12 @@ fi %{_libdir}/pkgconfig/* %changelog +* Mon Dec 14 2009 Matthias Clasen - 2.28.0-3 +- Avoid a crash when gconftool-2 can't read the db (#547238) + +* Wed Oct 7 2009 Matthias Clasen - 2.28.0-2 +- Fix a problem with schema translations + * Wed Sep 23 2009 Matthias Clasen - 2.28.0-1 - Update to 2.28.0 diff --git a/no-access-crash.patch b/no-access-crash.patch new file mode 100644 index 0000000..0206c34 --- /dev/null +++ b/no-access-crash.patch @@ -0,0 +1,49 @@ +diff -up GConf-2.28.0/gconf/gconf.c.no-access GConf-2.28.0/gconf/gconf.c +--- GConf-2.28.0/gconf/gconf.c.no-access 2009-12-14 14:05:28.356082892 -0500 ++++ GConf-2.28.0/gconf/gconf.c 2009-12-14 14:06:57.345056432 -0500 +@@ -511,6 +511,7 @@ gconf_engine_get_local (const gchar + { + GConfEngine* conf; + GConfSource* source; ++ GConfSources* sources; + + g_return_val_if_fail(address != NULL, NULL); + g_return_val_if_fail(err == NULL || *err == NULL, NULL); +@@ -519,10 +520,14 @@ gconf_engine_get_local (const gchar + + if (source == NULL) + return NULL; +- ++ ++ sources = gconf_sources_new_from_source(source); ++ if (sources == NULL) ++ return NULL; ++ + conf = gconf_engine_blank(FALSE); + +- conf->local_sources = gconf_sources_new_from_source(source); ++ conf->local_sources = sources; + + g_assert (gconf_engine_is_local (conf)); + +@@ -534,13 +539,19 @@ gconf_engine_get_local_for_addresses (GS + GError **err) + { + GConfEngine *conf; ++ GConfSources* sources; + + g_return_val_if_fail (addresses != NULL, NULL); + g_return_val_if_fail (err == NULL || *err == NULL, NULL); + ++ sources = gconf_sources_new_from_addresses (addresses, err); ++ ++ if (sources == NULL) ++ return NULL; ++ + conf = gconf_engine_blank (FALSE); + +- conf->local_sources = gconf_sources_new_from_addresses (addresses, err); ++ conf->local_sources = sources; + + g_assert (gconf_engine_is_local (conf)); +