From a06aa6083d5f03de43909e68f63a9763c5504bc8 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 12 May 2008 19:07:25 +0000 Subject: [PATCH] - If the session bus isn't running, don't autolaunch it unless we also want to autostart gconfd. --- GConf2.spec | 6 +++++- gconf-2.22.0-use-dbus.patch | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/GConf2.spec b/GConf2.spec index ebc6b43..b348eb1 100644 --- a/GConf2.spec +++ b/GConf2.spec @@ -7,7 +7,7 @@ Summary: A process-transparent configuration system Name: GConf2 Version: 2.22.0 -Release: 5%{?dist} +Release: 6%{?dist} License: LGPLv2+ Group: System Environment/Base Source: http://download.gnome.org/sources/GConf/2.22/GConf-%{version}.tar.bz2 @@ -160,6 +160,10 @@ fi %{_libdir}/pkgconfig/* %changelog +* Mon May 12 2008 Ray Strode - 2.22.0-6 +- If the session bus isn't running, don't autolaunch it unless + we also want to autostart gconfd. + * Thu May 8 2008 Ray Strode - 2.22.0-5 - Tie gconf to session bus. This means it will exit when the session exits and won't leave /tmp/gconf-$USER DoS possibilities diff --git a/gconf-2.22.0-use-dbus.patch b/gconf-2.22.0-use-dbus.patch index 9b1b91c..6e5aaf4 100644 --- a/gconf-2.22.0-use-dbus.patch +++ b/gconf-2.22.0-use-dbus.patch @@ -745,3 +745,22 @@ diff -up /dev/null GConf-2.22.0/gconf/org.gnome.GConf.service.in +[D-BUS Service] +Name=org.gnome.GConf +Exec=@libexecdir@/gconfd-2 +--- GConf-2.22.0/gconf/gconf-internals.c (revision 2592) ++++ GConf-2.22.0/gconf/gconf-internals.c (working copy) +@@ -2429,6 +2429,16 @@ get_ior (gboolean start_if_not_found, + DBusError bus_error; + char *ior; + ++ /* if the bus isn't running and we don't want to start gconfd then ++ * we don't want to autolaunch the bus either, so bail early. ++ */ ++ if (g_getenv ("DBUS_SESSION_BUS_ADDRESS") == NULL && !start_if_not_found) { ++ if (failure_log) ++ g_string_append_printf (failure_log, ++ _("Not running within active session")); ++ return NULL; ++ } ++ + dbus_error_init (&bus_error); + connection = dbus_bus_get (DBUS_BUS_SESSION, &bus_error); +