diff --git a/dbus-compile-userdb-cache.patch b/dbus-compile-userdb-cache.patch new file mode 100644 index 0000000..373fc7f --- /dev/null +++ b/dbus-compile-userdb-cache.patch @@ -0,0 +1,41 @@ +From ff997dd113565bb281c01b10d468e183992630df Mon Sep 17 00:00:00 2001 +From: Scott James Remnant +Date: Thu, 24 Apr 2008 16:00:16 +0100 +Subject: [PATCH] * dbus/dbus-userdb-util.c, dbus/dbus-userdb.c: Correct name of + macro used in #ifdef block to match that defined by configure, + otherwise the userdb cache will never be enabled. + +--- + dbus/dbus-userdb-util.c | 2 +- + dbus/dbus-userdb.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dbus/dbus-userdb-util.c b/dbus/dbus-userdb-util.c +index 30d5083..d03a7c7 100644 +--- a/dbus/dbus-userdb-util.c ++++ b/dbus/dbus-userdb-util.c +@@ -223,7 +223,7 @@ _dbus_user_database_lookup_group (DBusUserDatabase *db, + gid = n; + } + +-#ifdef DBUS_ENABLE_USER_CACHE ++#ifdef DBUS_ENABLE_USERDB_CACHE + if (gid != DBUS_GID_UNSET) + info = _dbus_hash_table_lookup_ulong (db->groups, gid); + else +diff --git a/dbus/dbus-userdb.c b/dbus/dbus-userdb.c +index 0e430b2..03d263f 100644 +--- a/dbus/dbus-userdb.c ++++ b/dbus/dbus-userdb.c +@@ -143,7 +143,7 @@ _dbus_user_database_lookup (DBusUserDatabase *db, + uid = n; + } + +-#ifdef DBUS_ENABLE_USER_CACHE ++#ifdef DBUS_ENABLE_USERDB_CACHE + if (uid != DBUS_UID_UNSET) + info = _dbus_hash_table_lookup_ulong (db->users, uid); + else +-- +1.5.4.3 + diff --git a/dbus-fix-guidless-conn-segfault.patch b/dbus-fix-guidless-conn-segfault.patch new file mode 100644 index 0000000..9f82ede --- /dev/null +++ b/dbus-fix-guidless-conn-segfault.patch @@ -0,0 +1,49 @@ +From cdf570506b77eca62ac8e5a5bfe2a1db0fbb1123 Mon Sep 17 00:00:00 2001 +From: Scott James Remnant +Date: Thu, 24 Apr 2008 15:58:34 +0100 +Subject: [PATCH] * dbus/dbus-connection.c (connection_forget_shared_unlocked): + Remove shared connections which lack a GUID from the list that + caches those, otherwise references to them will remain after + they have been freed. + +--- + dbus/dbus-connection.c | 11 ++++++++--- + 1 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c +index 3a1670c..5b25534 100644 +--- a/dbus/dbus-connection.c ++++ b/dbus/dbus-connection.c +@@ -1671,21 +1671,26 @@ connection_forget_shared_unlocked (DBusConnection *connection) + if (!connection->shareable) + return; + ++ _DBUS_LOCK (shared_connections); ++ + if (connection->server_guid != NULL) + { + _dbus_verbose ("dropping connection to %s out of the shared table\n", + connection->server_guid); + +- _DBUS_LOCK (shared_connections); +- + if (!_dbus_hash_table_remove_string (shared_connections, + connection->server_guid)) + _dbus_assert_not_reached ("connection was not in the shared table"); + + dbus_free (connection->server_guid); + connection->server_guid = NULL; +- _DBUS_UNLOCK (shared_connections); + } ++ else ++ { ++ _dbus_list_remove (&shared_connections_no_guid, connection); ++ } ++ ++ _DBUS_UNLOCK (shared_connections); + + /* remove our reference held on all shareable connections */ + _dbus_connection_unref_unlocked (connection); +-- +1.5.4.3 + diff --git a/dbus-hold-ref-during-dispatch.patch b/dbus-hold-ref-during-dispatch.patch new file mode 100644 index 0000000..86fd8f8 --- /dev/null +++ b/dbus-hold-ref-during-dispatch.patch @@ -0,0 +1,37 @@ +From d6ab6476e0986340ea43c1383ff8153ac224a4c9 Mon Sep 17 00:00:00 2001 +From: Scott James Remnant +Date: Thu, 24 Apr 2008 16:02:11 +0100 +Subject: [PATCH] * dbus/dbus-connection.c (_dbus_connection_read_write_dispatch): + Reference the D-Bus connection during the function call since we + call other functions that may free the last reference and we + still expect to be able to check the connection after they return + to decide our own return value. + +--- + dbus/dbus-connection.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/dbus/dbus-connection.c b/dbus/dbus-connection.c +index 5b25534..517deac 100644 +--- a/dbus/dbus-connection.c ++++ b/dbus/dbus-connection.c +@@ -3410,6 +3410,8 @@ _dbus_connection_read_write_dispatch (DBusConnection *connection, + { + DBusDispatchStatus dstatus; + dbus_bool_t no_progress_possible; ++ ++ dbus_connection_ref (connection); + + dstatus = dbus_connection_get_dispatch_status (connection); + +@@ -3450,6 +3452,7 @@ _dbus_connection_read_write_dispatch (DBusConnection *connection, + else + no_progress_possible = _dbus_connection_get_is_connected_unlocked (connection); + CONNECTION_UNLOCK (connection); ++ dbus_connection_unref (connection); + return !no_progress_possible; /* TRUE if we can make more progress */ + } + +-- +1.5.4.3 + diff --git a/dbus-reinit-addr-after-shutdown.patch b/dbus-reinit-addr-after-shutdown.patch new file mode 100644 index 0000000..09c67fa --- /dev/null +++ b/dbus-reinit-addr-after-shutdown.patch @@ -0,0 +1,27 @@ +From 7d257984d77cd6eba2ccb7c211e5a6466876ec1c Mon Sep 17 00:00:00 2001 +From: Scott James Remnant +Date: Thu, 24 Apr 2008 15:50:11 +0100 +Subject: [PATCH] * dbus/dbus-bus.c (addresses_shutdown_func): Reset initialized back + to FALSE after cleaning up the address list so that it will be + reinitialized again if D-Bus is used after dbus_shutdown() + +--- + dbus/dbus-bus.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/dbus/dbus-bus.c b/dbus/dbus-bus.c +index e159dae..f97cce6 100644 +--- a/dbus/dbus-bus.c ++++ b/dbus/dbus-bus.c +@@ -124,6 +124,8 @@ addresses_shutdown_func (void *data) + } + + activation_bus_type = DBUS_BUS_STARTER; ++ ++ initialized = FALSE; + } + + static dbus_bool_t +-- +1.5.4.3 + diff --git a/dbus.spec b/dbus.spec index 276ecb2..f146a8b 100644 --- a/dbus.spec +++ b/dbus.spec @@ -8,7 +8,7 @@ Summary: D-BUS message bus Name: dbus Version: 1.2.1 -Release: 3%{?dist} +Release: 4%{?dist} URL: http://www.freedesktop.org/software/dbus/ Source0: http://dbus.freedesktop.org/releases/dbus/%{name}-%{version}.tar.gz Source1: doxygen_to_devhelp.xsl @@ -39,6 +39,10 @@ Conflicts: cups < 1:1.1.20-4 Patch0: dbus-0.60-start-early.patch Patch1: dbus-1.0.1-generate-xml-docs.patch +Patch2: dbus-reinit-addr-after-shutdown.patch +Patch3: dbus-fix-guidless-conn-segfault.patch +Patch4: dbus-compile-userdb-cache.patch +Patch5: dbus-hold-ref-during-dispatch.patch %description @@ -94,6 +98,10 @@ in this separate package so server systems need not install X. %patch0 -p1 -b .start-early %patch1 -p1 -b .generate-xml-docs +%patch2 -p1 -b .reinit-addr-after-shutdown +%patch3 -p1 -b .fix-guidless-conn-segfault +%patch4 -p1 -b .compile-userdb-cache +%patch5 -p1 -b .hold-ref-during-dispatch autoreconf -f -i @@ -222,6 +230,9 @@ fi %{_includedir}/* %changelog +* Thu May 29 2008 Casey Dahlin - 1.2.1-4 +- Patches for fd.o bugs 15635, 15571, 15588, 15570 + * Mon May 12 2008 Ray Strode - 1.2.1-3 - drop last patch after discussion on dbus list