Date: Sunday, May 8, 2011 @ 08:20:20 Author: ibiru Revision: 123094 fixes crashers when user database is not present. FS#24160, FS#24164
Added: dconf/trunk/fix-crash-when-user-database-is-not-present.patch Modified: dconf/trunk/PKGBUILD ---------------------------------------------------+ PKGBUILD | 10 ++++-- fix-crash-when-user-database-is-not-present.patch | 29 ++++++++++++++++++++ 2 files changed, 36 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2011-05-08 09:33:27 UTC (rev 123093) +++ PKGBUILD 2011-05-08 12:20:20 UTC (rev 123094) @@ -2,7 +2,7 @@ # Maintainer: Ionut Biru <[email protected]> pkgname=dconf pkgver=0.7.4 -pkgrel=1 +pkgrel=2 pkgdesc="A low-level configuration system." arch=(i686 x86_64) url="http://live.gnome.org/dconf" @@ -11,12 +11,16 @@ makedepends=('vala' 'gobject-introspection' 'gtk3') optdepends=('gtk3: for dconf-editor') install=dconf.install -source=(http://download.gnome.org/sources/${pkgname}/0.7/${pkgname}-${pkgver}.tar.bz2) -sha256sums=('299d79daf0b214c692e7d5788d7bda76d778c1748ea37c33256c4fa6143b22cd') +source=(http://download.gnome.org/sources/${pkgname}/0.7/${pkgname}-${pkgver}.tar.bz2 + fix-crash-when-user-database-is-not-present.patch) +sha256sums=('299d79daf0b214c692e7d5788d7bda76d778c1748ea37c33256c4fa6143b22cd' + 'c78ea8db69a1be1286846282897f99e843e14d1e450beee4339d5500b2f0f73d') build() { cd "${srcdir}/${pkgname}-${pkgver}" + patch -Np1 -i "${srcdir}/fix-crash-when-user-database-is-not-present.patch" + ./configure --prefix=/usr --sysconfdir=/etc \ --libexecdir=/usr/lib/dconf make Added: fix-crash-when-user-database-is-not-present.patch =================================================================== --- fix-crash-when-user-database-is-not-present.patch (rev 0) +++ fix-crash-when-user-database-is-not-present.patch 2011-05-08 12:20:20 UTC (rev 123094) @@ -0,0 +1,29 @@ +From c80896f5644ec0a07822047dd7e899da63b42e89 Mon Sep 17 00:00:00 2001 +From: Ryan Lortie <[email protected]> +Date: Sun, 08 May 2011 12:08:38 +0000 +Subject: Fix crash when user database is not present + +If we fail to open the database in the user's home directory then the +variable will be NULL. The refactor of the read function for lockdown +support missed this check, resulting in a rather dramatic crash on fresh +accounts. +--- +diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c +index ec99116..087d780 100644 +--- a/engine/dconf-engine.c ++++ b/engine/dconf-engine.c +@@ -452,7 +452,11 @@ dconf_engine_read_internal (DConfEngine *engine, + break; + + while (i < limit && value == NULL) +- value = gvdb_table_get_value (engine->gvdbs[i++], key); ++ { ++ if (engine->gvdbs[i] != NULL) ++ value = gvdb_table_get_value (engine->gvdbs[i], key); ++ i++; ++ } + + g_static_mutex_unlock (&engine->lock); + +-- +cgit v0.9
