diff --git a/Makefile.in b/Makefile.in index 8cb800617528d82bb55a5aa5df49afcf705aaf79..7d1200e78439c56fc4b5331c0f6ea000bc00f177 100644 --- a/Makefile.in +++ b/Makefile.in @@ -123,8 +123,8 @@ DIST_COMMON = $(srcdir)/tools/lcov.am INSTALL NEWS README AUTHORS \ $(top_srcdir)/test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoExec.service.in \ $(top_srcdir)/test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service.in \ $(top_srcdir)/test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service.in \ - COPYING compile config.guess config.sub install-sh missing \ - ltmain.sh + COPYING compile config.guess config.sub depcomp install-sh \ + missing ltmain.sh subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \ @@ -328,6 +328,7 @@ DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@ DBUS_PREFIX = @DBUS_PREFIX@ DBUS_SESSION_BUS_CONNECT_ADDRESS = @DBUS_SESSION_BUS_CONNECT_ADDRESS@ DBUS_SESSION_BUS_LISTEN_ADDRESS = @DBUS_SESSION_BUS_LISTEN_ADDRESS@ +DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL = @DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@ DBUS_STATIC_BUILD_CPPFLAGS = @DBUS_STATIC_BUILD_CPPFLAGS@ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@ diff --git a/NEWS b/NEWS index d45c4ad734e5a6739675be6418679b74f9e3a675..4da37321b7907c466ad7c1bc24690cd0a31132b9 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,50 @@ +D-Bus 1.8.18 (2015-05-14) +== + +The “unicorn rifts” release. + +Security hardening: + +• On Unix platforms, change the default configuration for the session bus + to only allow EXTERNAL authentication (secure kernel-mediated + credentials-passing), as was already done for the system bus. + + This avoids falling back to DBUS_COOKIE_SHA1, which relies on strongly + unpredictable pseudo-random numbers; under certain circumstances + (/dev/urandom unreadable or malloc() returns NULL), dbus could + fall back to using rand(), which does not have the desired unpredictability. + The fallback to rand() has not been changed in this stable-branch since + the necessary code changes for correct error-handling are rather intrusive. + + If you are using D-Bus over the (unencrypted!) tcp: or nonce-tcp: transport, + in conjunction with DBUS_COOKIE_SHA1 and a shared home directory using + NFS or similar, you will need to reconfigure the session bus to accept + DBUS_COOKIE_SHA1 by commenting out the element. This configuration + is not recommended. + + (fd.o #90414, Simon McVittie) + +Other fixes: + +• Add locking to DBusCounter's reference count and notify function + (fd.o #89297, Adrian Szyndela) + +• Ensure that DBusTransport's reference count is protected by the + corresponding DBusConnection's lock (fd.o #90312, Adrian Szyndela) + +• On Windows, listen on the same port for IPv4 and IPv6 (previously + broken by an endianness mistake), and fix a failure to bind TCP + sockets on approximately 1 attempt in 256 (fd.o #87999, Ralf Habacker) + +• Correctly release DBusServer mutex before early-return if we run out + of memory while copying authentication mechanisms (fd.o #90004, + Ralf Habacker) + +• Fix some missing \n in verbose (debug log) messages (fd.o #90004, + Ralf Habacker) + +• Clean up some memory leaks in test code (fd.o #90004, Ralf Habacker) + D-Bus 1.8.16 (2015-02-09) == diff --git a/bus/Makefile.in b/bus/Makefile.in index 4425b030a8285ea866ca180a2108874b5dc6f5d8..7a9a59b2af5df7e0585cd11476fea8e6ecdf5c85 100644 --- a/bus/Makefile.in +++ b/bus/Makefile.in @@ -356,6 +356,7 @@ DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@ DBUS_PREFIX = @DBUS_PREFIX@ DBUS_SESSION_BUS_CONNECT_ADDRESS = @DBUS_SESSION_BUS_CONNECT_ADDRESS@ DBUS_SESSION_BUS_LISTEN_ADDRESS = @DBUS_SESSION_BUS_LISTEN_ADDRESS@ +DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL = @DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@ DBUS_STATIC_BUILD_CPPFLAGS = @DBUS_STATIC_BUILD_CPPFLAGS@ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@ diff --git a/bus/session.conf.in b/bus/session.conf.in index cfe9544fbe5913127df116d260870bfaf629a3d9..e78c1d33c6b93d0e817b4c640f81856fb7e3d2b4 100644 --- a/bus/session.conf.in +++ b/bus/session.conf.in @@ -14,6 +14,16 @@ @DBUS_SESSION_BUS_LISTEN_ADDRESS@ + + @DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL@ + diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index c767c1715415e78d42cae4bcb58730c6498c5568..af6e12ff8ec3a96195f36074f701460ff40329f0 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -435,6 +435,7 @@ if (WIN32) set (DBUS_SESSION_CONFIG_FILE "etc/dbus-1/session.conf") # bus-test expects a non empty string set (DBUS_USER "Administrator") + set (DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL "") else (WIN32) set (DBUS_SESSION_BUS_LISTEN_ADDRESS "unix:tmpdir=${DBUS_SESSION_SOCKET_DIR}" CACHE STRING "session bus default listening address") set (DBUS_SESSION_BUS_CONNECT_ADDRESS "autolaunch:" CACHE STRING "session bus fallback address for clients") @@ -443,6 +444,9 @@ else (WIN32) set (DBUS_SYSTEM_CONFIG_FILE ${configdir}/system.conf) set (DBUS_SESSION_CONFIG_FILE ${configdir}/session.conf) set (DBUS_USER "root") + # For best security, assume that all non-Windows platforms can do + # credentials-passing. + set (DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL "EXTERNAL") endif (WIN32) set (DBUS_DAEMON_NAME "dbus-daemon" CACHE STRING "The name of the dbus daemon executable") diff --git a/cmake/test/CMakeLists.txt b/cmake/test/CMakeLists.txt index ecad3046b9b88fd40ea19fcc4a91737dfa791b8f..7c91a9527f3d9d0c2c6b1e881851f058671ec7df 100644 --- a/cmake/test/CMakeLists.txt +++ b/cmake/test/CMakeLists.txt @@ -48,6 +48,10 @@ set (test-sleep-forever_SOURCES ${CMAKE_SOURCE_DIR}/../test/test-sleep-forever.c ) +set (manual-tcp_SOURCES + ${CMAKE_SOURCE_DIR}/../test/manual-tcp.c +) + 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}) @@ -57,6 +61,7 @@ add_helper_executable(test-spawn ${test-spawn_SOURCES} ${DBUS_INTERNAL_LIBRARIES add_helper_executable(test-exit ${test-exit_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) add_helper_executable(test-segfault ${test-segfault_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) add_helper_executable(test-sleep-forever ${test-sleep-forever_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) +add_test_executable(manual-tcp ${manual-tcp_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) if(DBUS_WITH_GLIB) message(STATUS "with glib test apps") diff --git a/configure b/configure index d32197579cd355dab873a71e0e7ef24c559f47a3..82a13134955e4e4fd0681337de9343137ac7c05d 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for dbus 1.8.16. +# Generated by GNU Autoconf 2.69 for dbus 1.8.18. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dbus' PACKAGE_TARNAME='dbus' -PACKAGE_VERSION='1.8.16' -PACKAGE_STRING='dbus 1.8.16' +PACKAGE_VERSION='1.8.18' +PACKAGE_STRING='dbus 1.8.18' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=dbus' PACKAGE_URL='' @@ -757,6 +757,7 @@ DBUS_WINCE_FALSE DBUS_WINCE_TRUE DBUS_WIN_FALSE DBUS_WIN_TRUE +DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL WINDRES BUILD_FILEVERSION BUILD_TIMESTAMP @@ -1513,7 +1514,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dbus 1.8.16 to adapt to many kinds of systems. +\`configure' configures dbus 1.8.18 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1587,7 +1588,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dbus 1.8.16:";; + short | recursive ) echo "Configuration of dbus 1.8.18:";; esac cat <<\_ACEOF @@ -1784,7 +1785,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dbus configure 1.8.16 +dbus configure 1.8.18 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2503,7 +2504,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dbus $as_me 1.8.16, which was +It was created by dbus $as_me 1.8.18, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3446,7 +3447,7 @@ fi # Define the identity of the package. PACKAGE='dbus' - VERSION='1.8.16' + VERSION='1.8.18' cat >>confdefs.h <<_ACEOF @@ -3746,7 +3747,7 @@ LT_CURRENT=11 ## increment any time the source changes; set to ## 0 if you increment CURRENT -LT_REVISION=11 +LT_REVISION=12 ## increment if any interfaces have been added; set to 0 ## if any interfaces have been changed or removed. removal has @@ -3759,8 +3760,8 @@ LT_AGE=8 DBUS_MAJOR_VERSION=1 DBUS_MINOR_VERSION=8 -DBUS_MICRO_VERSION=16 -DBUS_VERSION=1.8.16 +DBUS_MICRO_VERSION=18 +DBUS_VERSION=1.8.18 @@ -16655,6 +16656,15 @@ $as_echo "#define DBUS_CYGWIN 1" >>confdefs.h fi +# For best security, assume that all non-Windows platforms can do +# credentials-passing. +if test "$dbus_win" = yes; then : + DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL="" +else + DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL="EXTERNAL" +fi + + if test "$dbus_win" = yes; then DBUS_WIN_TRUE= DBUS_WIN_FALSE='#' @@ -23428,7 +23438,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dbus $as_me 1.8.16, which was +This file was extended by dbus $as_me 1.8.18, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23494,7 +23504,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -dbus config.status 1.8.16 +dbus config.status 1.8.18 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 0d0d5d5da2bfcd8142d1d31cf3bf0a96813155e5..eb803af34dfa943e959041fb5382347371615d98 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.63]) m4_define([dbus_major_version], [1]) m4_define([dbus_minor_version], [8]) -m4_define([dbus_micro_version], [16]) +m4_define([dbus_micro_version], [18]) m4_define([dbus_version], [dbus_major_version.dbus_minor_version.dbus_micro_version]) AC_INIT([dbus],[dbus_version],[https://bugs.freedesktop.org/enter_bug.cgi?product=dbus],[dbus]) @@ -37,7 +37,7 @@ LT_CURRENT=11 ## increment any time the source changes; set to ## 0 if you increment CURRENT -LT_REVISION=11 +LT_REVISION=12 ## increment if any interfaces have been added; set to 0 ## if any interfaces have been changed or removed. removal has @@ -122,6 +122,13 @@ if test "$dbus_cygwin" = yes; then AC_DEFINE(DBUS_CYGWIN,1,[Defined if we run on a cygwin API based system]) fi +# For best security, assume that all non-Windows platforms can do +# credentials-passing. +AS_IF([test "$dbus_win" = yes], + [DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL=""], + [DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL="EXTERNAL"]) +AC_SUBST([DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL]) + AM_CONDITIONAL(DBUS_WIN, test "$dbus_win" = yes) AM_CONDITIONAL(DBUS_WINCE, test "$dbus_wince" = yes) AM_CONDITIONAL(DBUS_UNIX, test "$dbus_unix" = yes) diff --git a/dbus/Makefile.in b/dbus/Makefile.in index 43e3c7d07e1c595fd327d41fe297e901e4923320..84cdb7de0750e2ee5a7ef126f703f7c751d4b9b3 100644 --- a/dbus/Makefile.in +++ b/dbus/Makefile.in @@ -502,6 +502,7 @@ DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@ DBUS_PREFIX = @DBUS_PREFIX@ DBUS_SESSION_BUS_CONNECT_ADDRESS = @DBUS_SESSION_BUS_CONNECT_ADDRESS@ DBUS_SESSION_BUS_LISTEN_ADDRESS = @DBUS_SESSION_BUS_LISTEN_ADDRESS@ +DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL = @DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@ DBUS_STATIC_BUILD_CPPFLAGS = @DBUS_STATIC_BUILD_CPPFLAGS@ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@ diff --git a/dbus/dbus-internals.c b/dbus/dbus-internals.c index 575a0875c89d6f8ec51274c1d2e362c23d1d7d17..9c8bc529f248736eeaf4aef1d346b7d24aae577d 100644 --- a/dbus/dbus-internals.c +++ b/dbus/dbus-internals.c @@ -499,7 +499,7 @@ _dbus_trace_ref (const char *obj_name, { VALGRIND_PRINTF_BACKTRACE ("%s %p ref stolen (%s)", obj_name, obj, why); - _dbus_verbose ("%s %p ref stolen (%s)", + _dbus_verbose ("%s %p ref stolen (%s)\n", obj_name, obj, why); } else @@ -507,7 +507,7 @@ _dbus_trace_ref (const char *obj_name, VALGRIND_PRINTF_BACKTRACE ("%s %p %d -> %d refs (%s)", obj_name, obj, old_refcount, new_refcount, why); - _dbus_verbose ("%s %p %d -> %d refs (%s)", + _dbus_verbose ("%s %p %d -> %d refs (%s)\n", obj_name, obj, old_refcount, new_refcount, why); } } diff --git a/dbus/dbus-marshal-recursive.c b/dbus/dbus-marshal-recursive.c index 4adfd2e9f3d03355045cb0a89aac12fba419185b..9ba16e93341746d2b80af0fb99819b7335851889 100644 --- a/dbus/dbus-marshal-recursive.c +++ b/dbus/dbus-marshal-recursive.c @@ -149,6 +149,7 @@ reader_init (DBusTypeReader *reader, const DBusString *value_str, int value_pos) { + _DBUS_ZERO (*reader); reader->byte_order = byte_order; reader->finished = FALSE; reader->type_str = type_str; @@ -736,11 +737,11 @@ _dbus_type_reader_init (DBusTypeReader *reader, const DBusString *value_str, int value_pos) { - reader->klass = &body_reader_class; - reader_init (reader, byte_order, type_str, type_pos, value_str, value_pos); + reader->klass = &body_reader_class; + #if RECURSIVE_MARSHAL_READ_TRACE _dbus_verbose (" type reader %p init type_pos = %d value_pos = %d remaining sig '%s'\n", reader, reader->type_pos, reader->value_pos, @@ -761,11 +762,11 @@ _dbus_type_reader_init_types_only (DBusTypeReader *reader, const DBusString *type_str, int type_pos) { - reader->klass = &body_types_only_reader_class; - reader_init (reader, DBUS_COMPILER_BYTE_ORDER /* irrelevant */, type_str, type_pos, NULL, _DBUS_INT_MAX /* crashes if we screw up */); + reader->klass = &body_types_only_reader_class; + #if RECURSIVE_MARSHAL_READ_TRACE _dbus_verbose (" type reader %p init types only type_pos = %d remaining sig '%s'\n", reader, reader->type_pos, @@ -988,6 +989,7 @@ void _dbus_type_reader_recurse (DBusTypeReader *reader, DBusTypeReader *sub) { + const DBusTypeReaderClass *klass; int t; t = _dbus_first_type_in_signature (reader->type_str, reader->type_pos); @@ -996,27 +998,27 @@ _dbus_type_reader_recurse (DBusTypeReader *reader, { case DBUS_TYPE_STRUCT: if (reader->klass->types_only) - sub->klass = &struct_types_only_reader_class; + klass = &struct_types_only_reader_class; else - sub->klass = &struct_reader_class; + klass = &struct_reader_class; break; case DBUS_TYPE_DICT_ENTRY: if (reader->klass->types_only) - sub->klass = &dict_entry_types_only_reader_class; + klass = &dict_entry_types_only_reader_class; else - sub->klass = &dict_entry_reader_class; + klass = &dict_entry_reader_class; break; case DBUS_TYPE_ARRAY: if (reader->klass->types_only) - sub->klass = &array_types_only_reader_class; + klass = &array_types_only_reader_class; else - sub->klass = &array_reader_class; + klass = &array_reader_class; break; case DBUS_TYPE_VARIANT: if (reader->klass->types_only) _dbus_assert_not_reached ("can't recurse into variant typecode"); else - sub->klass = &variant_reader_class; + klass = &variant_reader_class; break; default: _dbus_verbose ("recursing into type %s\n", _dbus_type_to_string (t)); @@ -1028,9 +1030,10 @@ _dbus_type_reader_recurse (DBusTypeReader *reader, _dbus_assert_not_reached ("don't yet handle recursing into this type"); } - _dbus_assert (sub->klass == all_reader_classes[sub->klass->id]); + _dbus_assert (klass == all_reader_classes[klass->id]); - (* sub->klass->recurse) (sub, reader); + (* klass->recurse) (sub, reader); + sub->klass = klass; #if RECURSIVE_MARSHAL_READ_TRACE _dbus_verbose (" type reader %p RECURSED type_pos = %d value_pos = %d remaining sig '%s'\n", diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index 3e74fc54e42c9091a917ebe957ad9af1e1e9341a..1f433712c6ebdede09e9418e7ba89a312b364210 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -4796,7 +4796,10 @@ dbus_message_demarshal (const char *str, return NULL; _dbus_message_loader_get_buffer (loader, &buffer); - _dbus_string_append_len (buffer, str, len); + + if (!_dbus_string_append_len (buffer, str, len)) + goto fail_oom; + _dbus_message_loader_return_buffer (loader, buffer); if (!_dbus_message_loader_queue_messages (loader)) diff --git a/dbus/dbus-nonce.c b/dbus/dbus-nonce.c index 37f30f003df8b4c8a2421288d0a45d0007a49eaa..0018d171cd4bc7a5c509dfb60d3d607b96177169 100644 --- a/dbus/dbus-nonce.c +++ b/dbus/dbus-nonce.c @@ -74,7 +74,13 @@ do_check_nonce (int fd, const DBusString *nonce, DBusError *error) } else { - _dbus_string_append_len(&buffer, _dbus_string_get_const_data (&p), n); + if (!_dbus_string_append_len (&buffer, _dbus_string_get_const_data (&p), n)) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + _dbus_string_free (&p); + _dbus_string_free (&buffer); + return FALSE; + } nleft -= n; } } diff --git a/dbus/dbus-resources.c b/dbus/dbus-resources.c index 80fb55b2fa2f6a2c24182838f00400ebb221346d..0617eae23652d640f1174e157c976e2c5dc320ec 100644 --- a/dbus/dbus-resources.c +++ b/dbus/dbus-resources.c @@ -69,6 +69,7 @@ struct DBusCounter DBusCounterNotifyFunction notify_function; /**< notify function */ void *notify_data; /**< data for notify function */ dbus_bool_t notify_pending : 1; /**< TRUE if the guard value has been crossed */ + DBusRMutex *mutex; /**< Lock on the entire DBusCounter */ }; /** @} */ /* end of resource limits internals docs */ @@ -95,6 +96,13 @@ _dbus_counter_new (void) counter->refcount = 1; + _dbus_rmutex_new_at_location (&counter->mutex); + if (counter->mutex == NULL) + { + dbus_free (counter); + counter = NULL; + } + return counter; } @@ -107,10 +115,14 @@ _dbus_counter_new (void) DBusCounter * _dbus_counter_ref (DBusCounter *counter) { + _dbus_rmutex_lock (counter->mutex); + _dbus_assert (counter->refcount > 0); counter->refcount += 1; + _dbus_rmutex_unlock (counter->mutex); + return counter; } @@ -123,13 +135,20 @@ _dbus_counter_ref (DBusCounter *counter) void _dbus_counter_unref (DBusCounter *counter) { + dbus_bool_t last_ref = FALSE; + + _dbus_rmutex_lock (counter->mutex); + _dbus_assert (counter->refcount > 0); counter->refcount -= 1; + last_ref = (counter->refcount == 0); + + _dbus_rmutex_unlock (counter->mutex); - if (counter->refcount == 0) + if (last_ref) { - + _dbus_rmutex_free_at_location (&counter->mutex); dbus_free (counter); } } @@ -148,7 +167,11 @@ void _dbus_counter_adjust_size (DBusCounter *counter, long delta) { - long old = counter->size_value; + long old = 0; + + _dbus_rmutex_lock (counter->mutex); + + old = counter->size_value; counter->size_value += delta; @@ -168,6 +191,8 @@ _dbus_counter_adjust_size (DBusCounter *counter, (old >= counter->notify_size_guard_value && counter->size_value < counter->notify_size_guard_value))) counter->notify_pending = TRUE; + + _dbus_rmutex_unlock (counter->mutex); } /** @@ -181,11 +206,20 @@ _dbus_counter_adjust_size (DBusCounter *counter, void _dbus_counter_notify (DBusCounter *counter) { + DBusCounterNotifyFunction notify_function = NULL; + void *notify_data = NULL; + + _dbus_rmutex_lock (counter->mutex); if (counter->notify_pending) { counter->notify_pending = FALSE; - (* counter->notify_function) (counter, counter->notify_data); + notify_function = counter->notify_function; + notify_data = counter->notify_data; } + _dbus_rmutex_unlock (counter->mutex); + + if (notify_function != NULL) + (* notify_function) (counter, notify_data); } /** @@ -202,7 +236,11 @@ void _dbus_counter_adjust_unix_fd (DBusCounter *counter, long delta) { - long old = counter->unix_fd_value; + long old = 0; + + _dbus_rmutex_lock (counter->mutex); + + old = counter->unix_fd_value; counter->unix_fd_value += delta; @@ -222,6 +260,8 @@ _dbus_counter_adjust_unix_fd (DBusCounter *counter, (old >= counter->notify_unix_fd_guard_value && counter->unix_fd_value < counter->notify_unix_fd_guard_value))) counter->notify_pending = TRUE; + + _dbus_rmutex_unlock (counter->mutex); } /** @@ -266,11 +306,13 @@ _dbus_counter_set_notify (DBusCounter *counter, DBusCounterNotifyFunction function, void *user_data) { + _dbus_rmutex_lock (counter->mutex); counter->notify_size_guard_value = size_guard_value; counter->notify_unix_fd_guard_value = unix_fd_guard_value; counter->notify_function = function; counter->notify_data = user_data; counter->notify_pending = FALSE; + _dbus_rmutex_unlock (counter->mutex); } #ifdef DBUS_ENABLE_STATS diff --git a/dbus/dbus-server.c b/dbus/dbus-server.c index c1d5f6e580fba69261c776dda8889692447f044b..7b8107922b215e182da549a91d58106087a77e0e 100644 --- a/dbus/dbus-server.c +++ b/dbus/dbus-server.c @@ -1043,7 +1043,10 @@ dbus_server_set_auth_mechanisms (DBusServer *server, { copy = _dbus_dup_string_array (mechanisms); if (copy == NULL) - return FALSE; + { + SERVER_UNLOCK (server); + return FALSE; + } } else copy = NULL; diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index 00848363a3072156fd4b9c9e67c350ed248b0a22..75f07e9c4da0f9feea95c25d06ba54691c1c62fc 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -1714,10 +1714,19 @@ _dbus_listen_tcp_socket (const char *host, if (bind (fd, (struct sockaddr*) tmp->ai_addr, tmp->ai_addrlen) == SOCKET_ERROR) { DBUS_SOCKET_SET_ERRNO (); + closesocket (fd); + if (errno == WSAEADDRINUSE) + { + /* Calling this function with port=0 tries to + * bind the same port twice, so we should + * ignore the second bind. + */ + tmp = tmp->ai_next; + continue; + } dbus_set_error (error, _dbus_error_from_errno (errno), "Failed to bind socket \"%s:%s\": %s", host ? host : "*", port, _dbus_strerror_from_errno ()); - closesocket (fd); goto failed; } @@ -1763,7 +1772,10 @@ _dbus_listen_tcp_socket (const char *host, host ? host : "*", port, _dbus_strerror_from_errno()); goto failed; } - snprintf( portbuf, sizeof( portbuf ) - 1, "%d", addr.AddressIn.sin_port ); + if (addr.AddressIn.sin_family = AF_INET) + snprintf( portbuf, sizeof( portbuf ) - 1, "%d", ntohs(addr.AddressIn.sin_port) ); + else + snprintf( portbuf, sizeof( portbuf ) - 1, "%d", ntohs(addr.AddressIn6.sin6_port) ); if (!_dbus_string_append(retport, portbuf)) { dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); diff --git a/dbus/dbus-transport.c b/dbus/dbus-transport.c index f63e0ced402b1ba3bc5eaff65c37c765c29e9b4d..e9dcc5681aa4ad7dedc2335ddfae91e346a692ab 100644 --- a/dbus/dbus-transport.c +++ b/dbus/dbus-transport.c @@ -63,6 +63,7 @@ live_messages_notify (DBusCounter *counter, { DBusTransport *transport = user_data; + _dbus_connection_lock (transport->connection); _dbus_transport_ref (transport); #if 0 @@ -77,12 +78,11 @@ live_messages_notify (DBusCounter *counter, */ if (transport->vtable->live_messages_changed) { - _dbus_connection_lock (transport->connection); (* transport->vtable->live_messages_changed) (transport); - _dbus_connection_unlock (transport->connection); } _dbus_transport_unref (transport); + _dbus_connection_unlock (transport->connection); } /** diff --git a/debian/changelog b/debian/changelog index 7c766756cf520826869f28a800c40acafc01b593..082feead8a32db76921028cecc41f0db51b0aea9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +dbus (1.8.18-1) unstable; urgency=medium + + * New upstream bugfix release + - Hardening: lock down the session bus to only allow EXTERNAL auth by + default, the same as the system bus. This avoids allowing + DBUS_COOKIE_SHA1, which can end up using a predictable random source + on systems where /dev/urandom is unavailable or dbus-daemon runs out + of memory. See the upstream NEWS for more details. + + -- Simon McVittie Thu, 14 May 2015 13:59:55 +0100 + dbus (1.8.16-2) unstable; urgency=medium * Merge packaging changes (but not the new upstream branch) from diff --git a/doc/Makefile.in b/doc/Makefile.in index a48c7e5a1d4ab321d730bf7cfc137ac612f4a80b..c372af76d71d338f298199e0be5d91049d7dc079 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -198,6 +198,7 @@ DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@ DBUS_PREFIX = @DBUS_PREFIX@ DBUS_SESSION_BUS_CONNECT_ADDRESS = @DBUS_SESSION_BUS_CONNECT_ADDRESS@ DBUS_SESSION_BUS_LISTEN_ADDRESS = @DBUS_SESSION_BUS_LISTEN_ADDRESS@ +DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL = @DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@ DBUS_STATIC_BUILD_CPPFLAGS = @DBUS_STATIC_BUILD_CPPFLAGS@ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@ diff --git a/test/Makefile.am b/test/Makefile.am index cec5cdabd49a7828a543005a0c8ad2adc5d91b9b..e0ed3c876fd45f14f13bc5726bb9aab7b8f9992a 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -119,6 +119,10 @@ test_syslog_SOURCES = internals/syslog.c test_syslog_CPPFLAGS = $(static_cppflags) test_syslog_LDADD = libdbus-testutils-internal.la $(GLIB_LIBS) +manual_tcp_SOURCES = manual-tcp.c +manual_tcp_CPPFLAGS = $(static_cppflags) +manual_tcp_LDADD = $(top_builddir)/dbus/libdbus-internal.la + EXTRA_DIST = dbus-test-runner testexecdir = $(libdir)/dbus-1.0/test @@ -130,6 +134,7 @@ installable_tests = \ test-printf \ $(NULL) installable_manual_tests = \ + manual-tcp \ $(NULL) if DBUS_WITH_GLIB diff --git a/test/Makefile.in b/test/Makefile.in index d8fc34a2a72392bf31f09e481e57af81b3da63d5..6585275771d6ae5579018393bb769ad13d33e9b0 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -169,7 +169,7 @@ libdbus_testutils_la_OBJECTS = $(am_libdbus_testutils_la_OBJECTS) am__EXEEXT_3 = test-shell$(EXEEXT) test-printf$(EXEEXT) \ $(am__EXEEXT_2) @DBUS_WITH_GLIB_TRUE@am__EXEEXT_4 = manual-authz$(EXEEXT) -am__EXEEXT_5 = $(am__EXEEXT_4) +am__EXEEXT_5 = manual-tcp$(EXEEXT) $(am__EXEEXT_4) @DBUS_ENABLE_INSTALLED_TESTS_FALSE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__EXEEXT_6 = $(am__EXEEXT_3) \ @DBUS_ENABLE_INSTALLED_TESTS_FALSE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@ $(am__EXEEXT_5) @DBUS_ENABLE_INSTALLED_TESTS_TRUE@@DBUS_ENABLE_MODULAR_TESTS_TRUE@am__EXEEXT_7 = $(am__EXEEXT_3) \ @@ -180,6 +180,9 @@ am_manual_authz_OBJECTS = manual_authz-manual-authz.$(OBJEXT) manual_authz_OBJECTS = $(am_manual_authz_OBJECTS) manual_authz_DEPENDENCIES = $(testutils_shared_if_possible_libs) \ $(am__DEPENDENCIES_1) +am_manual_tcp_OBJECTS = manual_tcp-manual-tcp.$(OBJEXT) +manual_tcp_OBJECTS = $(am_manual_tcp_OBJECTS) +manual_tcp_DEPENDENCIES = $(top_builddir)/dbus/libdbus-internal.la am_test_corrupt_OBJECTS = test_corrupt-corrupt.$(OBJEXT) test_corrupt_OBJECTS = $(am_test_corrupt_OBJECTS) test_corrupt_DEPENDENCIES = $(testutils_shared_if_possible_libs) \ @@ -282,7 +285,8 @@ am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdbus_testutils_internal_la_SOURCES) \ $(libdbus_testutils_la_SOURCES) $(manual_authz_SOURCES) \ - $(test_corrupt_SOURCES) $(test_dbus_daemon_SOURCES) \ + $(manual_tcp_SOURCES) $(test_corrupt_SOURCES) \ + $(test_dbus_daemon_SOURCES) \ $(test_dbus_daemon_eavesdrop_SOURCES) test-exit.c \ $(test_loopback_SOURCES) $(test_marshal_SOURCES) test-names.c \ $(test_printf_SOURCES) $(test_refs_SOURCES) \ @@ -292,8 +296,8 @@ SOURCES = $(libdbus_testutils_internal_la_SOURCES) \ $(test_syntax_SOURCES) $(test_syslog_SOURCES) DIST_SOURCES = $(libdbus_testutils_internal_la_SOURCES) \ $(am__libdbus_testutils_la_SOURCES_DIST) \ - $(manual_authz_SOURCES) $(test_corrupt_SOURCES) \ - $(test_dbus_daemon_SOURCES) \ + $(manual_authz_SOURCES) $(manual_tcp_SOURCES) \ + $(test_corrupt_SOURCES) $(test_dbus_daemon_SOURCES) \ $(test_dbus_daemon_eavesdrop_SOURCES) test-exit.c \ $(test_loopback_SOURCES) $(test_marshal_SOURCES) test-names.c \ $(test_printf_SOURCES) $(test_refs_SOURCES) \ @@ -612,6 +616,7 @@ DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@ DBUS_PREFIX = @DBUS_PREFIX@ DBUS_SESSION_BUS_CONNECT_ADDRESS = @DBUS_SESSION_BUS_CONNECT_ADDRESS@ DBUS_SESSION_BUS_LISTEN_ADDRESS = @DBUS_SESSION_BUS_LISTEN_ADDRESS@ +DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL = @DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@ DBUS_STATIC_BUILD_CPPFLAGS = @DBUS_STATIC_BUILD_CPPFLAGS@ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@ @@ -860,10 +865,13 @@ test_refs_LDADD = libdbus-testutils-internal.la $(GLIB_LIBS) test_syslog_SOURCES = internals/syslog.c test_syslog_CPPFLAGS = $(static_cppflags) test_syslog_LDADD = libdbus-testutils-internal.la $(GLIB_LIBS) +manual_tcp_SOURCES = manual-tcp.c +manual_tcp_CPPFLAGS = $(static_cppflags) +manual_tcp_LDADD = $(top_builddir)/dbus/libdbus-internal.la EXTRA_DIST = dbus-test-runner $(in_data) $(static_data) testexecdir = $(libdir)/dbus-1.0/test installable_tests = test-shell test-printf $(NULL) $(am__append_3) -installable_manual_tests = $(NULL) $(am__append_4) +installable_manual_tests = manual-tcp $(NULL) $(am__append_4) installcheck_tests = $(am__append_6) installcheck_environment = \ XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR \ @@ -1148,6 +1156,10 @@ manual-authz$(EXEEXT): $(manual_authz_OBJECTS) $(manual_authz_DEPENDENCIES) $(EX @rm -f manual-authz$(EXEEXT) $(AM_V_CCLD)$(LINK) $(manual_authz_OBJECTS) $(manual_authz_LDADD) $(LIBS) +manual-tcp$(EXEEXT): $(manual_tcp_OBJECTS) $(manual_tcp_DEPENDENCIES) $(EXTRA_manual_tcp_DEPENDENCIES) + @rm -f manual-tcp$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(manual_tcp_OBJECTS) $(manual_tcp_LDADD) $(LIBS) + test-corrupt$(EXEEXT): $(test_corrupt_OBJECTS) $(test_corrupt_DEPENDENCIES) $(EXTRA_test_corrupt_DEPENDENCIES) @rm -f test-corrupt$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_corrupt_OBJECTS) $(test_corrupt_LDADD) $(LIBS) @@ -1228,6 +1240,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdbus_testutils_internal_la-test-utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/manual_authz-manual-authz.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/manual_tcp-manual-tcp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/marshal.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syntax.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-exit.Po@am__quote@ @@ -1290,6 +1303,20 @@ manual_authz-manual-authz.obj: manual-authz.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(manual_authz_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o manual_authz-manual-authz.obj `if test -f 'manual-authz.c'; then $(CYGPATH_W) 'manual-authz.c'; else $(CYGPATH_W) '$(srcdir)/manual-authz.c'; fi` +manual_tcp-manual-tcp.o: manual-tcp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(manual_tcp_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT manual_tcp-manual-tcp.o -MD -MP -MF $(DEPDIR)/manual_tcp-manual-tcp.Tpo -c -o manual_tcp-manual-tcp.o `test -f 'manual-tcp.c' || echo '$(srcdir)/'`manual-tcp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/manual_tcp-manual-tcp.Tpo $(DEPDIR)/manual_tcp-manual-tcp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='manual-tcp.c' object='manual_tcp-manual-tcp.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(manual_tcp_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o manual_tcp-manual-tcp.o `test -f 'manual-tcp.c' || echo '$(srcdir)/'`manual-tcp.c + +manual_tcp-manual-tcp.obj: manual-tcp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(manual_tcp_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT manual_tcp-manual-tcp.obj -MD -MP -MF $(DEPDIR)/manual_tcp-manual-tcp.Tpo -c -o manual_tcp-manual-tcp.obj `if test -f 'manual-tcp.c'; then $(CYGPATH_W) 'manual-tcp.c'; else $(CYGPATH_W) '$(srcdir)/manual-tcp.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/manual_tcp-manual-tcp.Tpo $(DEPDIR)/manual_tcp-manual-tcp.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='manual-tcp.c' object='manual_tcp-manual-tcp.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(manual_tcp_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o manual_tcp-manual-tcp.obj `if test -f 'manual-tcp.c'; then $(CYGPATH_W) 'manual-tcp.c'; else $(CYGPATH_W) '$(srcdir)/manual-tcp.c'; fi` + test_corrupt-corrupt.o: corrupt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_corrupt_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_corrupt-corrupt.o -MD -MP -MF $(DEPDIR)/test_corrupt-corrupt.Tpo -c -o test_corrupt-corrupt.o `test -f 'corrupt.c' || echo '$(srcdir)/'`corrupt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_corrupt-corrupt.Tpo $(DEPDIR)/test_corrupt-corrupt.Po diff --git a/test/manual-tcp.c b/test/manual-tcp.c new file mode 100644 index 0000000000000000000000000000000000000000..64691c9d82f123288496077db32bb75f25e62e08 --- /dev/null +++ b/test/manual-tcp.c @@ -0,0 +1,46 @@ +/* + * Simple manual tcp check + * + * supports: + * - server listening check + * + * syntax: manual-tcp [|] + * +*/ + +#include "config.h" +#include "dbus/dbus-server-socket.h" + +#include + +int +main (int argc, char **argv) +{ + DBusServer *server; + DBusError error; + int result = 0; + int i; + + char *family = NULL; + + if (argc == 2) + family = argv[1]; + + for (i = 0; i < 1000; i++) + { + dbus_error_init (&error); + server = _dbus_server_new_for_tcp_socket ("localhost", "localhost", "0", family, &error, FALSE); + if (server == NULL) + { + printf("%d: %s %s\n",i, error.name, error.message); + dbus_error_free(&error); + result = -1; + } + else { + printf("%d: %s \n",i, dbus_server_get_address(server)); + dbus_server_disconnect(server); + dbus_server_unref(server); + } + } + return result; +} diff --git a/test/name-test/Makefile.in b/test/name-test/Makefile.in index 466bd54d8e105f2ecd854c36e18be10f087a463b..bb8cf48372aebb870a931f9d086e7c6f23f8487a 100644 --- a/test/name-test/Makefile.in +++ b/test/name-test/Makefile.in @@ -446,6 +446,7 @@ DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@ DBUS_PREFIX = @DBUS_PREFIX@ DBUS_SESSION_BUS_CONNECT_ADDRESS = @DBUS_SESSION_BUS_CONNECT_ADDRESS@ DBUS_SESSION_BUS_LISTEN_ADDRESS = @DBUS_SESSION_BUS_LISTEN_ADDRESS@ +DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL = @DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@ DBUS_STATIC_BUILD_CPPFLAGS = @DBUS_STATIC_BUILD_CPPFLAGS@ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@ diff --git a/test/relay.c b/test/relay.c index ecfe4c82586327d160fc3e4d1cbd2d88a78e7f1a..984fde104184ed96d78f037efdaea74725ea4c15 100644 --- a/test/relay.c +++ b/test/relay.c @@ -273,6 +273,7 @@ teardown (Fixture *f, { if (f->left_client_conn != NULL) { + test_connection_shutdown(NULL, f->left_client_conn); dbus_connection_close (f->left_client_conn); dbus_connection_unref (f->left_client_conn); f->left_client_conn = NULL; @@ -280,6 +281,7 @@ teardown (Fixture *f, if (f->right_client_conn != NULL) { + test_connection_shutdown(NULL, f->right_client_conn); dbus_connection_close (f->right_client_conn); dbus_connection_unref (f->right_client_conn); f->right_client_conn = NULL; @@ -287,6 +289,7 @@ teardown (Fixture *f, if (f->left_server_conn != NULL) { + test_connection_shutdown(NULL, f->left_server_conn); dbus_connection_close (f->left_server_conn); dbus_connection_unref (f->left_server_conn); f->left_server_conn = NULL; @@ -294,6 +297,7 @@ teardown (Fixture *f, if (f->right_server_conn != NULL) { + test_connection_shutdown(NULL, f->right_server_conn); dbus_connection_close (f->right_server_conn); dbus_connection_unref (f->right_server_conn); f->right_server_conn = NULL; diff --git a/tools/Makefile.in b/tools/Makefile.in index dd562f103321f05ddf177c192a994b21faf15708..0f5d9e73861d4e4c87cf8e9ae6c52365cc0a2442 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -247,6 +247,7 @@ DBUS_PATH_OR_ABSTRACT = @DBUS_PATH_OR_ABSTRACT@ DBUS_PREFIX = @DBUS_PREFIX@ DBUS_SESSION_BUS_CONNECT_ADDRESS = @DBUS_SESSION_BUS_CONNECT_ADDRESS@ DBUS_SESSION_BUS_LISTEN_ADDRESS = @DBUS_SESSION_BUS_LISTEN_ADDRESS@ +DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL = @DBUS_SESSION_CONF_MAYBE_AUTH_EXTERNAL@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@ DBUS_STATIC_BUILD_CPPFLAGS = @DBUS_STATIC_BUILD_CPPFLAGS@ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@