Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package dbus-1 for openSUSE:Factory checked 
in at 2023-02-11 21:55:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dbus-1 (Old)
 and      /work/SRC/openSUSE:Factory/.dbus-1.new.1848 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "dbus-1"

Sat Feb 11 21:55:59 2023 rev:176 rq:1064302 version:1.14.6

Changes:
--------
dbus-1-x11.changes: same change
--- /work/SRC/openSUSE:Factory/dbus-1/dbus-1.changes    2022-10-27 
13:54:46.752753243 +0200
+++ /work/SRC/openSUSE:Factory/.dbus-1.new.1848/dbus-1.changes  2023-02-11 
21:56:06.623169417 +0100
@@ -1,0 +2,40 @@
+Fri Feb 10 15:24:52 UTC 2023 - Dominique Leuenberger <dims...@opensuse.org>
+
+- Fix multibuild: do not mention main flavor in multibuild, as it
+  is implicit built.
+
+-------------------------------------------------------------------
+Thu Feb  9 17:04:27 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 1.14.6:
+  * Fix an incorrect assertion that could be used to crash
+    dbus-daemon or other users of DBusServer prior to
+    authentication, if libdbus was compiled with assertions
+    enabled.
+    We recommend that production builds of dbus, for example in
+    OS distributions, should be compiled with checks but
+    without assertions.
+  * When connected to a dbus-broker, stop dbus-monitor from
+    incorrectly replying to Peer method calls that were sent to the
+    dbus-broker with a NULL destination
+  * Fix out-of-bounds varargs read in the dbus-daemon's config-
+    parser.  This is not attacker-triggerable and appears to be
+    harmless in practice, but is technically undefined behaviour
+    and is detected as such by AddressSanitizer.
+  * Avoid a data race in multi-threaded use of DBusCounter
+  * Fix a crash with some glibc versions when non-auditable
+    SELinux events are logged (dbus!386, Jeremi Piotrowski)
+  * If dbus_message_demarshal() runs out of memory while
+    validating a message, report it as NoMemory rather than
+    InvalidArgs (dbus#420, Simon McVittie)
+  * Use C11 _Alignof if available, for better standards-
+    compliance
+  * Stop including an outdated copy of pkg.m4 in the git tree
+  * Documentation:
+  * Fix the test-apparmor-activation test after dbus#416
+  * Internal changes:
+  * Fix CI builds with recent git versions (dbus#447, Simon
+    McVittie)
+- switch to using multibuild
+
+-------------------------------------------------------------------

Old:
----
  dbus-1.14.4.tar.xz
  dbus-1.14.4.tar.xz.asc

New:
----
  _multibuild
  dbus-1.14.6.tar.xz
  dbus-1.14.6.tar.xz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ dbus-1-devel-doc.spec ++++++
--- /var/tmp/diff_new_pack.2MLPjt/_old  2023-02-11 21:56:07.427174422 +0100
+++ /var/tmp/diff_new_pack.2MLPjt/_new  2023-02-11 21:56:07.431174447 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package dbus-1-devel-doc
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -23,7 +23,7 @@
 %global _backup 
%{_sysconfdir}/sysconfig/services.rpmbak.%{name}-%{version}-%{release}
 %bcond_without selinux
 Name:           dbus-1-devel-doc
-Version:        1.14.4
+Version:        1.14.6
 Release:        0
 Summary:        Developer documentation package for D-Bus
 License:        AFL-2.1 OR GPL-2.0-or-later

++++++ dbus-1-x11.spec ++++++
--- /var/tmp/diff_new_pack.2MLPjt/_old  2023-02-11 21:56:07.455174597 +0100
+++ /var/tmp/diff_new_pack.2MLPjt/_new  2023-02-11 21:56:07.459174622 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package dbus-1-x11
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -23,7 +23,7 @@
 %endif
 %bcond_without selinux
 Name:           dbus-1-x11
-Version:        1.14.4
+Version:        1.14.6
 Release:        0
 Summary:        D-Bus Message Bus System
 License:        AFL-2.1 OR GPL-2.0-or-later

++++++ dbus-1.spec ++++++
--- /var/tmp/diff_new_pack.2MLPjt/_old  2023-02-11 21:56:07.491174821 +0100
+++ /var/tmp/diff_new_pack.2MLPjt/_new  2023-02-11 21:56:07.495174846 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package dbus-1
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -21,7 +21,7 @@
 %define _libname libdbus-1-3
 %bcond_without selinux
 Name:           dbus-1
-Version:        1.14.4
+Version:        1.14.6
 Release:        0
 Summary:        D-Bus Message Bus System
 License:        AFL-2.1 OR GPL-2.0-or-later

++++++ _multibuild ++++++
<multibuild>
<package>dbus-1-devel-doc</package>
<package>dbus-1-x11</package>
</multibuild>

++++++ dbus-1.14.4.tar.xz -> dbus-1.14.6.tar.xz ++++++
++++ 2926 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/NEWS new/dbus-1.14.6/NEWS
--- old/dbus-1.14.4/NEWS        2022-10-05 12:02:29.000000000 +0200
+++ new/dbus-1.14.6/NEWS        2023-02-08 13:04:12.000000000 +0100
@@ -1,3 +1,52 @@
+dbus 1.14.6 (2023-02-08)
+========================
+
+Denial of service fixes:
+
+• Fix an incorrect assertion that could be used to crash dbus-daemon or
+  other users of DBusServer prior to authentication, if libdbus was compiled
+  with assertions enabled.
+  We recommend that production builds of dbus, for example in OS distributions,
+  should be compiled with checks but without assertions.
+  (dbus#421, Ralf Habacker; thanks to Evgeny Vereshchagin)
+
+Other fixes:
+
+• When connected to a dbus-broker, stop dbus-monitor from incorrectly
+  replying to Peer method calls that were sent to the dbus-broker with
+  a NULL destination (dbus#301, Kai A. Hiller)
+
+• Fix out-of-bounds varargs read in the dbus-daemon's config-parser.
+  This is not attacker-triggerable and appears to be harmless in practice,
+  but is technically undefined behaviour and is detected as such by
+  AddressSanitizer. (dbus!357, Evgeny Vereshchagin)
+
+• Avoid a data race in multi-threaded use of DBusCounter
+  (dbus#426, Ralf Habacker)
+
+• Fix a crash with some glibc versions when non-auditable SELinux events
+  are logged (dbus!386, Jeremi Piotrowski)
+
+• If dbus_message_demarshal() runs out of memory while validating a message,
+  report it as NoMemory rather than InvalidArgs (dbus#420, Simon McVittie)
+
+• Use C11 _Alignof if available, for better standards-compliance
+  (dbus!389, Khem Raj)
+
+• Stop including an outdated copy of pkg.m4 in the git tree
+  (dbus!365, Simon McVittie)
+
+• Documentation:
+  · Consistently use Gitlab bug reporting URL (dbus!372, Marco Trevisan)
+
+• Tests fixes:
+  · Fix the test-apparmor-activation test after dbus#416
+    (dbus!380, Dave Jones)
+
+Internal changes:
+
+• Fix CI builds with recent git versions (dbus#447, Simon McVittie)
+
 dbus 1.14.4 (2022-10-05)
 ========================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/aminclude_static.am new/dbus-1.14.6/aminclude_static.am
--- old/dbus-1.14.4/aminclude_static.am 2022-10-05 12:04:55.000000000 +0200
+++ new/dbus-1.14.6/aminclude_static.am 2023-02-08 13:04:21.000000000 +0100
@@ -1,6 +1,6 @@
 
 # aminclude_static.am generated automatically by Autoconf
-# from AX_AM_MACROS_STATIC on Wed Oct  5 11:04:55 BST 2022
+# from AX_AM_MACROS_STATIC on Wed Feb  8 12:04:21 GMT 2023
 
 
 # Code coverage
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/bus/config-parser.c new/dbus-1.14.6/bus/config-parser.c
--- old/dbus-1.14.4/bus/config-parser.c 2022-10-02 16:06:53.000000000 +0200
+++ new/dbus-1.14.6/bus/config-parser.c 2023-01-30 10:57:39.000000000 +0100
@@ -642,10 +642,11 @@
   va_start (args, first_attribute_retloc);
 
   name = va_arg (args, const char*);
-  retloc = va_arg (args, const char**);
+  retloc = NULL;
 
   while (name != NULL)
     {
+      retloc = va_arg (args, const char**);
       _dbus_assert (retloc != NULL);
       _dbus_assert (n_attrs < MAX_ATTRS);
 
@@ -655,7 +656,6 @@
       *retloc = NULL;
 
       name = va_arg (args, const char*);
-      retloc = va_arg (args, const char**);
     }
 
   va_end (args);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/bus/selinux.c new/dbus-1.14.6/bus/selinux.c
--- old/dbus-1.14.4/bus/selinux.c       2022-10-02 16:06:53.000000000 +0200
+++ new/dbus-1.14.6/bus/selinux.c       2023-02-08 11:09:44.000000000 +0100
@@ -112,9 +112,6 @@
      * syslog if OOM, like the equivalent AppArmor code does. */
     char buf[PATH_MAX*2];
 
-    /* FIXME: need to change this to show real user */
-    vsnprintf(buf, sizeof(buf), fmt, ap);
-
     switch (type)
       {
       case SELINUX_AVC:
@@ -137,6 +134,8 @@
       }
 
     if (audit_type > 0) {
+      /* FIXME: need to change this to show real user */
+      vsnprintf(buf, sizeof(buf), fmt, ap);
       audit_log_user_avc_message(audit_fd, audit_type, buf, NULL, NULL,
                              NULL, getuid());
       goto out;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/cmake/DBus1ConfigVersion.cmake 
new/dbus-1.14.6/cmake/DBus1ConfigVersion.cmake
--- old/dbus-1.14.4/cmake/DBus1ConfigVersion.cmake      2022-10-05 
12:05:53.000000000 +0200
+++ new/dbus-1.14.6/cmake/DBus1ConfigVersion.cmake      2023-02-08 
13:04:29.000000000 +0100
@@ -1,4 +1,4 @@
-set(PACKAGE_VERSION 1.14.4)
+set(PACKAGE_VERSION 1.14.6)
 
 # Check whether the requested PACKAGE_FIND_VERSION is compatible
 if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/configure.ac new/dbus-1.14.6/configure.ac
--- old/dbus-1.14.4/configure.ac        2022-10-05 12:02:20.000000000 +0200
+++ new/dbus-1.14.6/configure.ac        2023-02-08 13:04:12.000000000 +0100
@@ -3,7 +3,7 @@
 
 m4_define([dbus_major_version], [1])
 m4_define([dbus_minor_version], [14])
-m4_define([dbus_micro_version], [4])
+m4_define([dbus_micro_version], [6])
 m4_define([dbus_version],
           [dbus_major_version.dbus_minor_version.dbus_micro_version])
 AC_INIT([dbus], [dbus_version], 
[https://gitlab.freedesktop.org/dbus/dbus/issues], [dbus])
@@ -42,7 +42,7 @@
 
 ## increment any time the source changes; set to
 ##  0 if you increment CURRENT
-LT_REVISION=1
+LT_REVISION=2
 
 ## increment if any interfaces have been added; set to 0
 ## if any interfaces have been changed or removed. removal has
@@ -750,7 +750,7 @@
 save_libs="$LIBS"
 LIBS="$LIBS $THREAD_LIBS"
 
-is_missing_pthread_function="is required when compiling D-Bus on Unix 
platforms, but is not in your libc or libpthread. Please open a bug on 
https://bugs.freedesktop.org/enter_bug.cgi?product=dbus with details of your 
platform."
+is_missing_pthread_function="is required when compiling D-Bus on Unix 
platforms, but is not in your libc or libpthread. Please open a bug on 
https://gitlab.freedesktop.org/dbus/dbus/-/issues/new with details of your 
platform."
 
 # Don't do these automatic checks if the user set THREAD_LIBS on the
 # configure command-line. If they did, we assume they're right.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/dbus/dbus-connection-internal.h 
new/dbus-1.14.6/dbus/dbus-connection-internal.h
--- old/dbus-1.14.4/dbus/dbus-connection-internal.h     2022-10-02 
16:06:53.000000000 +0200
+++ new/dbus-1.14.6/dbus/dbus-connection-internal.h     2023-01-30 
10:57:39.000000000 +0100
@@ -120,6 +120,9 @@
                                                                    char        
   **label_p);
 DBUS_PRIVATE_EXPORT
 DBusCredentials  *_dbus_connection_get_credentials                
(DBusConnection  *connection);
+DBUS_PRIVATE_EXPORT
+void              _dbus_connection_set_builtin_filters_enabled    
(DBusConnection  *connection,
+                                                                   dbus_bool_t 
     value);
 
 /* if DBUS_ENABLE_STATS */
 DBUS_PRIVATE_EXPORT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/dbus/dbus-connection.c new/dbus-1.14.6/dbus/dbus-connection.c
--- old/dbus-1.14.4/dbus/dbus-connection.c      2022-10-02 16:06:53.000000000 
+0200
+++ new/dbus-1.14.6/dbus/dbus-connection.c      2023-01-30 10:57:39.000000000 
+0100
@@ -316,6 +316,8 @@
   
   unsigned int exit_on_disconnect : 1; /**< If #TRUE, exit after handling 
disconnect signal */
 
+  unsigned int builtin_filters_enabled : 1; /**< If #TRUE, handle 
org.freedesktop.DBus.Peer messages automatically, whether they have a bus name 
or not */
+
   unsigned int route_peer_messages : 1; /**< If #TRUE, if 
org.freedesktop.DBus.Peer messages have a bus name, don't handle them 
automatically */
 
   unsigned int disconnected_message_arrived : 1;   /**< We popped or are 
dispatching the disconnected message.
@@ -1343,6 +1345,7 @@
   connection->objects = objects;
   connection->exit_on_disconnect = FALSE;
   connection->shareable = FALSE;
+  connection->builtin_filters_enabled = TRUE;
   connection->route_peer_messages = FALSE;
   connection->disconnected_message_arrived = FALSE;
   connection->disconnected_message_processed = FALSE;
@@ -4657,10 +4660,14 @@
       goto out;
     }
 
-  result = _dbus_connection_run_builtin_filters_unlocked_no_update 
(connection, message);
-  if (result != DBUS_HANDLER_RESULT_NOT_YET_HANDLED)
-    goto out;
- 
+  /* If skipping builtin filters, we are probably a monitor. */
+  if (connection->builtin_filters_enabled)
+    {
+      result = _dbus_connection_run_builtin_filters_unlocked_no_update 
(connection, message);
+      if (result != DBUS_HANDLER_RESULT_NOT_YET_HANDLED)
+        goto out;
+    }
+
   if (!_dbus_list_copy (&connection->filter_list, &filter_list_copy))
     {
       _dbus_connection_release_dispatch (connection);
@@ -5532,6 +5539,38 @@
   CONNECTION_UNLOCK (connection);
 }
 
+/**
+ * Enables the builtin filtering of messages.
+ *
+ * Currently the only filtering implemented by libdbus and mandated by the spec
+ * is that of peer messages.
+ *
+ * If #TRUE, #DBusConnection automatically handles all messages to the
+ * org.freedesktop.DBus.Peer interface. For monitors this can break the
+ * specification if the response is sending a message.
+ *
+ * If #FALSE, the result is similar to calling
+ * dbus_connection_set_route_peer_messages() with argument TRUE, but
+ * messages with a NULL destination are also dispatched to the
+ * application instead of being passed to the built-in filters.
+ *
+ * If a normal application disables this flag, it can break things badly. So
+ * only unset this if you are a monitor.
+ *
+ * @param connection the connection
+ * @param value #TRUE to pass through org.freedesktop.DBus.Peer messages
+ */
+void
+_dbus_connection_set_builtin_filters_enabled (DBusConnection        
*connection,
+                                              dbus_bool_t            value)
+{
+  _dbus_assert (connection != NULL);
+
+  CONNECTION_LOCK (connection);
+  connection->builtin_filters_enabled = value;
+  CONNECTION_UNLOCK (connection);
+}
+
 /**
  *
  * Normally #DBusConnection automatically handles all messages to the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/dbus/dbus-internals.h new/dbus-1.14.6/dbus/dbus-internals.h
--- old/dbus-1.14.4/dbus/dbus-internals.h       2022-10-02 16:06:53.000000000 
+0200
+++ new/dbus-1.14.6/dbus/dbus-internals.h       2023-02-08 11:03:39.000000000 
+0100
@@ -201,8 +201,12 @@
     ((intptr_t) ((unsigned char*) &((struct_type*) 0)->member))
 #endif
 
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && 
!defined(__cplusplus)
+#define _DBUS_ALIGNOF(type) _Alignof(type)
+#else
 #define _DBUS_ALIGNOF(type) \
     (_DBUS_STRUCT_OFFSET (struct { char _1; type _2; }, _2))
+#endif
 
 #if defined(DBUS_DISABLE_CHECKS) || defined(DBUS_DISABLE_ASSERT)
 /* this is an assert and not an error, but in the typical --disable-checks 
case (you're trying
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/dbus/dbus-message.c new/dbus-1.14.6/dbus/dbus-message.c
--- old/dbus-1.14.4/dbus/dbus-message.c 2022-10-02 16:06:53.000000000 +0200
+++ new/dbus-1.14.6/dbus/dbus-message.c 2023-01-30 10:57:39.000000000 +0100
@@ -5185,6 +5185,9 @@
   return msg;
 
  fail_corrupt:
+  if (loader->corruption_reason == DBUS_VALIDITY_UNKNOWN_OOM_ERROR)
+    goto fail_oom;
+
   dbus_set_error (error, DBUS_ERROR_INVALID_ARGS, "Message is corrupted (%s)",
                   _dbus_validity_to_error_message (loader->corruption_reason));
   _dbus_message_loader_unref (loader);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/dbus/dbus-resources.c new/dbus-1.14.6/dbus/dbus-resources.c
--- old/dbus-1.14.4/dbus/dbus-resources.c       2022-10-02 16:06:53.000000000 
+0200
+++ new/dbus-1.14.6/dbus/dbus-resources.c       2023-01-30 10:57:39.000000000 
+0100
@@ -273,7 +273,11 @@
 long
 _dbus_counter_get_size_value (DBusCounter *counter)
 {
-  return counter->size_value;
+  long result;
+  _dbus_rmutex_lock (counter->mutex);
+  result = counter->size_value;
+  _dbus_rmutex_unlock (counter->mutex);
+  return result;
 }
 
 /**
@@ -285,7 +289,11 @@
 long
 _dbus_counter_get_unix_fd_value (DBusCounter *counter)
 {
-  return counter->unix_fd_value;
+  long result;
+  _dbus_rmutex_lock (counter->mutex);
+  result = counter->unix_fd_value;
+  _dbus_rmutex_unlock (counter->mutex);
+  return result;
 }
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/dbus/dbus-resources.h new/dbus-1.14.6/dbus/dbus-resources.h
--- old/dbus-1.14.4/dbus/dbus-resources.h       2022-10-02 16:06:53.000000000 
+0200
+++ new/dbus-1.14.6/dbus/dbus-resources.h       2023-01-30 10:57:39.000000000 
+0100
@@ -23,6 +23,7 @@
 #ifndef DBUS_RESOURCES_H
 #define DBUS_RESOURCES_H
 
+#include <dbus/dbus-internals.h>
 #include <dbus/dbus-macros.h>
 #include <dbus/dbus-errors.h>
 #include <dbus/dbus-connection.h>
@@ -33,17 +34,22 @@
 
 typedef void (* DBusCounterNotifyFunction) (DBusCounter *counter,
                                             void        *user_data);
-
+DBUS_EMBEDDED_TESTS_EXPORT
 DBusCounter* _dbus_counter_new       (void);
 DBusCounter* _dbus_counter_ref       (DBusCounter *counter);
+DBUS_EMBEDDED_TESTS_EXPORT
 void         _dbus_counter_unref     (DBusCounter *counter);
 
+DBUS_EMBEDDED_TESTS_EXPORT
 void         _dbus_counter_adjust_size       (DBusCounter *counter,
                                               long         delta);
+DBUS_EMBEDDED_TESTS_EXPORT
 void         _dbus_counter_adjust_unix_fd    (DBusCounter *counter,
                                               long         delta);
 void         _dbus_counter_notify            (DBusCounter *counter);
+DBUS_EMBEDDED_TESTS_EXPORT
 long         _dbus_counter_get_size_value    (DBusCounter *counter);
+DBUS_EMBEDDED_TESTS_EXPORT
 long         _dbus_counter_get_unix_fd_value (DBusCounter *counter);
 
 void _dbus_counter_set_notify    (DBusCounter               *counter,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/dbus/dbus-string.c new/dbus-1.14.6/dbus/dbus-string.c
--- old/dbus-1.14.4/dbus/dbus-string.c  2022-10-02 16:06:53.000000000 +0200
+++ new/dbus-1.14.6/dbus/dbus-string.c  2023-02-08 13:04:12.000000000 +0100
@@ -1878,7 +1878,7 @@
       ++i;
     }
 
-  _dbus_assert (i == real->len || !DBUS_IS_ASCII_WHITE (real->str[i]));
+  _dbus_assert (i == real->len || !DBUS_IS_ASCII_BLANK (real->str[i]));
   
   if (end)
     *end = i;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/dbus/dbus-sysdeps-unix.c 
new/dbus-1.14.6/dbus/dbus-sysdeps-unix.c
--- old/dbus-1.14.4/dbus/dbus-sysdeps-unix.c    2022-10-02 16:06:53.000000000 
+0200
+++ new/dbus-1.14.6/dbus/dbus-sysdeps-unix.c    2023-02-08 11:30:57.000000000 
+0100
@@ -2440,7 +2440,7 @@
 #else /* no supported mechanism */
 
 #warning Socket credentials not supported on this Unix OS
-#warning Please tell https://bugs.freedesktop.org/enter_bug.cgi?product=DBus
+#warning Please tell https://gitlab.freedesktop.org/dbus/dbus/-/issues/new
 
     /* Please add other operating systems known to support at least one of
      * the mechanisms above to this list, keeping alphabetical order.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/m4/pkg.m4 new/dbus-1.14.6/m4/pkg.m4
--- old/dbus-1.14.4/m4/pkg.m4   2022-02-23 15:39:11.000000000 +0100
+++ new/dbus-1.14.6/m4/pkg.m4   1970-01-01 01:00:00.000000000 +0100
@@ -1,155 +0,0 @@
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-#
-# Copyright © 2004 Scott James Remnant <sc...@netsplit.com>.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-       AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-       _pkg_min_version=m4_default([$1], [0.9.0])
-       AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-       if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-               AC_MSG_RESULT([yes])
-       else
-               AC_MSG_RESULT([no])
-               PKG_CONFIG=""
-       fi
-
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
-
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$$1"; then
-    pkg_cv_[]$1="$$1"
- elif test -n "$PKG_CONFIG"; then
-    PKG_CHECK_EXISTS([$3],
-                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-                    [pkg_failed=yes])
- else
-    pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables 
$1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
-
-if test $pkg_failed = yes; then
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 
2>&1`
-        else
-               $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
-        fi
-       # Put the nasty error message in config.log where it belongs
-       echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
-       ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met:
-
-$$1_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-_PKG_TEXT
-])],
-               [AC_MSG_RESULT([no])
-                $4])
-elif test $pkg_failed = untried; then
-       ifelse([$4], , [AC_MSG_FAILURE(dnl
-[The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-_PKG_TEXT
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
-               [$4])
-else
-       $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-       $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-       ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/test/CMakeLists.txt new/dbus-1.14.6/test/CMakeLists.txt
--- old/dbus-1.14.4/test/CMakeLists.txt 2022-10-05 11:41:03.000000000 +0200
+++ new/dbus-1.14.6/test/CMakeLists.txt 2023-02-08 13:04:02.000000000 +0100
@@ -78,6 +78,7 @@
 add_helper_executable(test-service ${test-service_SOURCES} dbus-testutils)
 add_helper_executable(test-names ${test-names_SOURCES} dbus-testutils)
 add_test_executable(test-shell ${test-shell_SOURCES} 
${DBUS_INTERNAL_LIBRARIES})
+add_test_executable(test-string internals/strings.c dbus-testutils)
 add_test_executable(test-printf internals/printf.c dbus-testutils)
 add_helper_executable(test-privserver test-privserver.c dbus-testutils)
 add_helper_executable(test-shell-service ${test-shell-service_SOURCES} 
dbus-testutils)
@@ -158,6 +159,7 @@
 
     if(NOT WIN32)
         add_test_executable(test-bus-system bus/system.c 
launch-helper-internal dbus-testutils)
+        add_test_executable(test-counter internals/counter.c dbus-testutils)
         if(ENABLE_TRADITIONAL_ACTIVATION)
             add_test_executable(test-bus-launch-helper-oom 
bus/launch-helper-oom.c launch-helper-internal dbus-testutils)
             add_helper_executable(dbus-daemon-launch-helper-for-tests 
bus/launch-helper-for-tests.c launch-helper-internal)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/test/Makefile.am new/dbus-1.14.6/test/Makefile.am
--- old/dbus-1.14.4/test/Makefile.am    2022-10-05 11:41:03.000000000 +0200
+++ new/dbus-1.14.6/test/Makefile.am    2023-02-08 13:04:02.000000000 +0100
@@ -90,9 +90,13 @@
        test-bus-dispatch-sha1 \
        test-marshal-recursive \
        test-message-internals \
+       test-strings \
        $(NULL)
 
 if DBUS_UNIX
+test_counter_SOURCES = internals/counter.c
+test_counter_LDADD = libdbus-testutils.la
+
 if ENABLE_TRADITIONAL_ACTIVATION
 uninstallable_test_programs += test-bus-launch-helper-oom
 uninstallable_test_programs += test-bus-system
@@ -128,6 +132,8 @@
 test_shell_service_LDADD = libdbus-testutils.la
 test_shell_SOURCES = shell-test.c
 test_shell_LDADD = libdbus-testutils.la
+test_strings_SOURCES = internals/strings.c
+test_strings_LDADD = libdbus-testutils.la
 
 if ENABLE_TRADITIONAL_ACTIVATION
 test_spawn_SOURCES = spawn-test.c
@@ -355,6 +361,14 @@
        $(NULL)
 endif DBUS_WITH_GLIB
 
+if DBUS_UNIX
+if DBUS_ENABLE_EMBEDDED_TESTS
+installable_tests += \
+       test-counter \
+       $(NULL)
+endif DBUS_ENABLE_EMBEDDED_TESTS
+endif DBUS_UNIX
+
 installable_test_meta = \
        $(dist_installable_test_scripts:=.test) \
        $(dist_installed_test_scripts:=.test) \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/test/data/dbus-installed-tests.aaprofile.in 
new/dbus-1.14.6/test/data/dbus-installed-tests.aaprofile.in
--- old/dbus-1.14.4/test/data/dbus-installed-tests.aaprofile.in 2022-02-23 
15:39:11.000000000 +0100
+++ new/dbus-1.14.6/test/data/dbus-installed-tests.aaprofile.in 2023-02-08 
11:31:30.000000000 +0100
@@ -32,6 +32,7 @@
   # We aren't really confining this process seriously; allow most things.
   /** mrix,
   /tmp/dbus-daemon-test.*/{,**} w,
+  /tmp/dbus-* w,
   @{sys}/kernel/security/apparmor/** w,
   dbus (send, receive, bind),
   network,
@@ -44,6 +45,7 @@
     #include <abstractions/base>
 
     /** mrix,
+    /tmp/dbus-* w,
     @{sys}/kernel/security/apparmor/** w,
     dbus (send, receive, bind),
     network,
@@ -62,6 +64,7 @@
     #include <abstractions/base>
 
     /** mrix,
+    /tmp/dbus-* w,
     @{sys}/kernel/security/apparmor/** w,
     dbus,
     network,
@@ -88,6 +91,7 @@
     #include <abstractions/base>
 
     /** mrix,
+    /tmp/dbus-* w,
     @{sys}/kernel/security/apparmor/** w,
     dbus (send, receive, bind),
     network,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/test/internals/counter.c 
new/dbus-1.14.6/test/internals/counter.c
--- old/dbus-1.14.4/test/internals/counter.c    1970-01-01 01:00:00.000000000 
+0100
+++ new/dbus-1.14.6/test/internals/counter.c    2023-01-30 10:57:39.000000000 
+0100
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2023 Ralf Habacker
+ * SPDX-License-Identifier: MIT
+ */
+
+#include <config.h>
+
+#include "dbus/dbus-resources.h"
+#include "dbus/dbus-test.h"
+#include "dbus/dbus-test-tap.h"
+#include "test/test-utils.h"
+
+#include <pthread.h>
+
+static dbus_bool_t verbose = FALSE;
+static DBusCounter *counter = NULL;
+
+static void* unix_fd_thread1 (void *arg _DBUS_GNUC_UNUSED)
+{
+  long i;
+  for (i=0; i < 10000; i++)
+    {
+      long j;
+      _dbus_counter_adjust_unix_fd (counter, 1);
+      j = _dbus_counter_get_unix_fd_value (counter);
+      if (verbose)
+        _dbus_test_diag ("write %ld\n", j);
+    }
+  return NULL;
+}
+
+static void* unix_fd_thread2 (void *arg _DBUS_GNUC_UNUSED)
+{
+  long j = 0;
+  do
+    {
+      j = _dbus_counter_get_unix_fd_value (counter);
+      if (verbose)
+        _dbus_test_diag ("read %ld\n", j);
+    } while (j < 10000);
+  return NULL;
+}
+
+static void* size_value_thread1 (void *arg _DBUS_GNUC_UNUSED)
+{
+  long i;
+  for (i=0; i < 10000; i++)
+    {
+      long j;
+      _dbus_counter_adjust_size (counter, 1);
+      j = _dbus_counter_get_size_value (counter);
+      if (verbose)
+        _dbus_test_diag ("write %ld\n", j);
+    }
+  return NULL;
+}
+
+static void* size_value_thread2 (void *arg _DBUS_GNUC_UNUSED)
+{
+  long j = 0;
+  do
+    {
+      j = _dbus_counter_get_size_value (counter);
+      if (verbose)
+        _dbus_test_diag("read %ld\n", j);
+    } while (j < 10000);
+  return NULL;
+}
+
+static dbus_bool_t
+_dbus_counter_unix_fd_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
+{
+  pthread_t tid[2];
+  dbus_bool_t ret = TRUE;
+  counter = _dbus_counter_new ();
+
+  pthread_create (&(tid[0]), NULL, &unix_fd_thread1, NULL);
+  pthread_create (&(tid[1]), NULL, &unix_fd_thread2, NULL);
+
+  pthread_join (tid[0], NULL);
+  pthread_join (tid[1], NULL);
+
+  _dbus_counter_unref (counter);
+
+  return ret;
+}
+
+static dbus_bool_t
+_dbus_counter_size_value_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
+{
+  pthread_t tid[2];
+  dbus_bool_t ret = TRUE;
+  counter = _dbus_counter_new ();
+
+  pthread_create (&(tid[0]), NULL, &size_value_thread1, NULL);
+  pthread_create (&(tid[1]), NULL, &size_value_thread2, NULL);
+
+  pthread_join (tid[0], NULL);
+  pthread_join (tid[1], NULL);
+
+  _dbus_counter_unref (counter);
+
+  return ret;
+}
+
+static const DBusTestCase test[] =
+{
+  { "unix_fd", _dbus_counter_unix_fd_test },
+  { "size", _dbus_counter_size_value_test },
+};
+
+
+int
+main (int    argc,
+      char **argv)
+{
+  return _dbus_test_main (argc, argv, sizeof(test) / sizeof (DBusTestCase), 
test,
+                          DBUS_TEST_FLAGS_CHECK_MEMORY_LEAKS,
+                          NULL, NULL);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/test/internals/strings.c 
new/dbus-1.14.6/test/internals/strings.c
--- old/dbus-1.14.4/test/internals/strings.c    1970-01-01 01:00:00.000000000 
+0100
+++ new/dbus-1.14.6/test/internals/strings.c    2023-02-08 13:04:02.000000000 
+0100
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2023 Ralf Habacker
+ * SPDX-License-Identifier: MIT
+ */
+
+#include <config.h>
+
+#include "dbus/dbus-string.h"
+#include "dbus/dbus-test.h"
+#include "dbus/dbus-test-tap.h"
+#include "test/test-utils.h"
+
+static dbus_bool_t
+_dbus_string_skip_blank_test (const char *test_data_dir _DBUS_GNUC_UNUSED)
+{
+  int end;
+  DBusString s = _DBUS_STRING_INIT_INVALID;
+  const char *p = " \rT\r\n";
+
+  _dbus_string_init (&s);
+  if (!_dbus_string_append (&s, p))
+    {
+      _dbus_string_free (&s);
+      return FALSE;
+    }
+
+  _dbus_string_skip_blank (&s, 0, &end);
+  _dbus_string_free (&s);
+  return TRUE;
+}
+
+static const DBusTestCase test[] =
+{
+  { "skip_blank", _dbus_string_skip_blank_test },
+};
+
+
+int
+main (int    argc,
+      char **argv)
+{
+  return _dbus_test_main (argc, argv, sizeof(test) / sizeof (DBusTestCase), 
test,
+                          DBUS_TEST_FLAGS_CHECK_MEMORY_LEAKS,
+                          NULL, NULL);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/test/loopback.c new/dbus-1.14.6/test/loopback.c
--- old/dbus-1.14.4/test/loopback.c     2022-10-02 16:06:53.000000000 +0200
+++ new/dbus-1.14.6/test/loopback.c     2023-01-30 10:57:39.000000000 +0100
@@ -61,6 +61,37 @@
     g_error ("expected success but got error: %s: %s", e->name, e->message);
 }
 
+/* these are macros so they get the right line number */
+
+#define assert_method_reply(m, sender, destination, signature) \
+do { \
+  g_assert_cmpstr (dbus_message_type_to_string (dbus_message_get_type (m)), \
+      ==, dbus_message_type_to_string (DBUS_MESSAGE_TYPE_METHOD_RETURN)); \
+  g_assert_cmpstr (dbus_message_get_sender (m), ==, sender); \
+  g_assert_cmpstr (dbus_message_get_destination (m), ==, destination); \
+  g_assert_cmpstr (dbus_message_get_path (m), ==, NULL); \
+  g_assert_cmpstr (dbus_message_get_interface (m), ==, NULL); \
+  g_assert_cmpstr (dbus_message_get_member (m), ==, NULL); \
+  g_assert_cmpstr (dbus_message_get_signature (m), ==, signature); \
+  g_assert_cmpint (dbus_message_get_serial (m), !=, 0); \
+  g_assert_cmpint (dbus_message_get_reply_serial (m), !=, 0); \
+} while (0)
+
+#define assert_error_reply(m, sender, destination, error_name) \
+do { \
+  g_assert_cmpstr (dbus_message_type_to_string (dbus_message_get_type (m)), \
+      ==, dbus_message_type_to_string (DBUS_MESSAGE_TYPE_ERROR)); \
+  g_assert_cmpstr (dbus_message_get_sender (m), ==, sender); \
+  g_assert_cmpstr (dbus_message_get_destination (m), ==, destination); \
+  g_assert_cmpstr (dbus_message_get_error_name (m), ==, error_name); \
+  g_assert_cmpstr (dbus_message_get_path (m), ==, NULL); \
+  g_assert_cmpstr (dbus_message_get_interface (m), ==, NULL); \
+  g_assert_cmpstr (dbus_message_get_member (m), ==, NULL); \
+  g_assert_cmpstr (dbus_message_get_signature (m), ==, "s"); \
+  g_assert_cmpint (dbus_message_get_serial (m), !=, 0); \
+  g_assert_cmpint (dbus_message_get_reply_serial (m), !=, 0); \
+} while (0)
+
 static DBusHandlerResult
 server_message_cb (DBusConnection *server_conn,
     DBusMessage *message,
@@ -416,6 +447,59 @@
 }
 
 static void
+test_builtin_filters (Fixture *f,
+    gconstpointer addr)
+{
+  dbus_bool_t have_mem;
+  dbus_uint32_t serial;
+  DBusMessage *ping;
+  DBusMessage *m;
+
+  if (f->skip)
+    return;
+
+  test_connect (f, addr);
+
+  ping = dbus_message_new_method_call (NULL, "/foo", DBUS_INTERFACE_PEER,
+      "Ping");
+
+  _dbus_connection_set_builtin_filters_enabled (f->client_conn, TRUE);
+
+  have_mem = dbus_connection_send (f->server_conn, ping, &serial);
+  g_assert (have_mem);
+  g_assert (serial != 0);
+
+  while (g_queue_get_length (&f->server_messages) < 1)
+    test_main_context_iterate (f->ctx, TRUE);
+
+  m = g_queue_pop_head (&f->server_messages);
+  assert_method_reply (m, NULL, NULL, "");
+  dbus_message_unref (m);
+
+  m = g_queue_pop_head (&f->server_messages);
+  g_assert (m == NULL);
+
+  _dbus_connection_set_builtin_filters_enabled (f->client_conn, FALSE);
+
+  have_mem = dbus_connection_send (f->server_conn, ping, &serial);
+  g_assert (have_mem);
+  g_assert (serial != 0);
+
+  while (g_queue_get_length (&f->server_messages) < 1)
+    test_main_context_iterate (f->ctx, TRUE);
+
+  m = g_queue_pop_head (&f->server_messages);
+  assert_error_reply (m, NULL, NULL,
+      "org.freedesktop.DBus.Error.UnknownMethod");
+  dbus_message_unref (m);
+
+  m = g_queue_pop_head (&f->server_messages);
+  g_assert (m == NULL);
+
+  dbus_message_unref (ping);
+}
+
+static void
 teardown (Fixture *f,
     gconstpointer addr G_GNUC_UNUSED)
 {
@@ -523,6 +607,9 @@
       test_bad_guid, teardown);
 #endif
 
+  g_test_add ("/builtin-filters", Fixture, "tcp:host=127.0.0.1", setup,
+      test_builtin_filters, teardown);
+
   ret = g_test_run ();
   dbus_shutdown ();
   return ret;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/test/message.c new/dbus-1.14.6/test/message.c
--- old/dbus-1.14.4/test/message.c      2022-10-05 11:41:03.000000000 +0200
+++ new/dbus-1.14.6/test/message.c      2023-01-30 10:57:39.000000000 +0100
@@ -291,15 +291,6 @@
           goto out;
         }
 
-      /* TODO: Validity checking sometimes returns InvalidArgs for OOM */
-      if (dbus_error_has_name (&e, DBUS_ERROR_INVALID_ARGS) &&
-          !have_memory &&
-          strstr (e.message, "Out of memory") != NULL)
-        {
-          g_test_message ("Out of memory (not a problem)");
-          goto out;
-        }
-
       g_test_message ("Parsing %s reported unexpected error %s: %s",
                       path, e.name, e.message);
       g_test_fail ();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/test/monitor.c new/dbus-1.14.6/test/monitor.c
--- old/dbus-1.14.4/test/monitor.c      2022-10-02 16:06:53.000000000 +0200
+++ new/dbus-1.14.6/test/monitor.c      2023-01-30 10:57:39.000000000 +0100
@@ -28,6 +28,8 @@
 
 #include <string.h>
 
+#include "dbus/dbus-connection-internal.h"
+
 #include "test-utils-glib.h"
 
 typedef struct {
@@ -505,7 +507,7 @@
   int i;
   dbus_uint32_t zero = 0;
 
-  dbus_connection_set_route_peer_messages (f->monitor, TRUE);
+  _dbus_connection_set_builtin_filters_enabled (f->monitor, FALSE);
 
   if (config == NULL)
     config = f->config;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/dbus-1.14.4/tools/dbus-monitor.c new/dbus-1.14.6/tools/dbus-monitor.c
--- old/dbus-1.14.4/tools/dbus-monitor.c        2022-10-02 16:06:53.000000000 
+0200
+++ new/dbus-1.14.6/tools/dbus-monitor.c        2023-01-30 10:57:39.000000000 
+0100
@@ -21,6 +21,7 @@
 
 #include <config.h>
 
+#include "dbus/dbus-connection-internal.h"
 #include "dbus/dbus-internals.h"
 
 #include <stdio.h>
@@ -494,7 +495,7 @@
   /* Receive o.fd.Peer messages as normal messages, rather than having
    * libdbus handle them internally, which is the wrong thing for
    * a monitor */
-  dbus_connection_set_route_peer_messages (connection, TRUE);
+  _dbus_connection_set_builtin_filters_enabled (connection, FALSE);
 
   if (!dbus_connection_add_filter (connection, filter_func,
                                    _DBUS_INT_TO_POINTER (binary_mode), NULL))

Reply via email to