- If the session bus isn't running, don't autolaunch it unless we also want

to autostart gconfd.
epel9
Ray Strode 17 years ago
parent 6e77a58a39
commit a06aa6083d

@ -7,7 +7,7 @@
Summary: A process-transparent configuration system Summary: A process-transparent configuration system
Name: GConf2 Name: GConf2
Version: 2.22.0 Version: 2.22.0
Release: 5%{?dist} Release: 6%{?dist}
License: LGPLv2+ License: LGPLv2+
Group: System Environment/Base Group: System Environment/Base
Source: http://download.gnome.org/sources/GConf/2.22/GConf-%{version}.tar.bz2 Source: http://download.gnome.org/sources/GConf/2.22/GConf-%{version}.tar.bz2
@ -160,6 +160,10 @@ fi
%{_libdir}/pkgconfig/* %{_libdir}/pkgconfig/*
%changelog %changelog
* Mon May 12 2008 Ray Strode <rstrode@redhat.com> - 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 <rstrode@redhat.com> - 2.22.0-5 * Thu May 8 2008 Ray Strode <rstrode@redhat.com> - 2.22.0-5
- Tie gconf to session bus. This means it will exit when the session - Tie gconf to session bus. This means it will exit when the session
exits and won't leave /tmp/gconf-$USER DoS possibilities exits and won't leave /tmp/gconf-$USER DoS possibilities

@ -745,3 +745,22 @@ diff -up /dev/null GConf-2.22.0/gconf/org.gnome.GConf.service.in
+[D-BUS Service] +[D-BUS Service]
+Name=org.gnome.GConf +Name=org.gnome.GConf
+Exec=@libexecdir@/gconfd-2 +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);

Loading…
Cancel
Save