Hello community, here is the log from the commit of package dbus-1 for openSUSE:Factory checked in at 2016-08-25 09:50:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dbus-1 (Old) and /work/SRC/openSUSE:Factory/.dbus-1.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dbus-1" Changes: -------- --- /work/SRC/openSUSE:Factory/dbus-1/dbus-1-x11.changes 2016-03-29 09:52:23.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.dbus-1.new/dbus-1-x11.changes 2016-08-25 09:50:49.000000000 +0200 @@ -1,0 +2,44 @@ +Mon Aug 22 09:08:03 UTC 2016 - [email protected] + +- Update to 1.10.10 + * Fixes: + + On Linux, when dbus-daemon is run with reduced susceptibility + to the OOM killer (typically via systemd), do not let child + processes inherit that setting (fdo#32851; + Kimmo Hämäläinen, WaLyong Cho) + + Output valid shell syntax in ~/.dbus/session-bus/ if the bus + address contains a semicolon (fdo#94746, Thiago Macieira) + + Fix memory leaks and thread safety in subprocess starting on + Windows (fdo#95191, Ralf Habacker) + + Do not require systemd to have a service file if using it for + activation (fdo#93194; Simon McVittie; backport from 1.11.0) + + Stop test-dbus-daemon incorrectly failing on platforms that + cannot discover the process ID of clients (fdo#96653, + Руслан Ижбулатов) + + In tests that exercise correct handling of crashing D-Bus + services, suppress Windows crash handler (fdo#95155; + Yiyang Fei, Ralf Habacker) + + Explicitly check for stdint.h (Ioan-Adrian Ratiu) + + update-activation-environment: produce better diagnostics on + error (fdo#96653, Simon McVittie) + + Don't fail the build with an unused const variable warning + under gcc 6 (fdo#97282; Thomas Zimmermann, Simon McVittie) + + Merge dbus-1.10-ci branch, containing backports from 1.11.0 + in build/test code to support continuous integration + (fdo#93194, Simon McVittie) + - Avoid -Wunused-label when compiling with libselinux but no + libaudit + - In development builds, allow OOM tests to be disabled as + documented + - Accept and ignore the --tap argument in all "embedded + tests", and run all automated tests with that argument for + better diagnostics + - Fix the systemd activation test under CMake by installing + the required files + - In Automake, fix shell syntax for installcheck-local with + no DESTDIR + - In Automake, don't try to run manual tests in installcheck + - In CMake, don't run manual-tcp test as an automated test + - Add travis-ci.org build machinery + +------------------------------------------------------------------- @@ -312 +356 @@ - (CVE-2014-7824, fd.o #85105; Simon McVittie, Alban Crequy) + (CVE-2014-7824, fdo#85105; Simon McVittie, Alban Crequy) dbus-1.changes: same change Old: ---- dbus-1.10.8.tar.gz New: ---- dbus-1.10.10.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dbus-1-x11.spec ++++++ --- /var/tmp/diff_new_pack.dByncQ/_old 2016-08-25 09:50:51.000000000 +0200 +++ /var/tmp/diff_new_pack.dByncQ/_new 2016-08-25 09:50:51.000000000 +0200 @@ -27,7 +27,7 @@ Url: http://dbus.freedesktop.org/ # COMMON1-BEGIN # COMMON1-BEGIN -Version: 1.10.8 +Version: 1.10.10 Release: 0 Source0: http://dbus.freedesktop.org/releases/dbus/%{_name}-%{version}.tar.gz Source2: dbus-1.desktop ++++++ dbus-1.spec ++++++ --- /var/tmp/diff_new_pack.dByncQ/_old 2016-08-25 09:50:51.000000000 +0200 +++ /var/tmp/diff_new_pack.dByncQ/_new 2016-08-25 09:50:51.000000000 +0200 @@ -28,7 +28,7 @@ Url: http://dbus.freedesktop.org/ # WARNING don't use cosmetic beautifiers. it will break the specs after calling pre_checkin script. we don't need to be pretty, but efficient # COMMON1-BEGIN -Version: 1.10.8 +Version: 1.10.10 Release: 0 Source0: http://dbus.freedesktop.org/releases/dbus/%{_name}-%{version}.tar.gz Source2: dbus-1.desktop ++++++ dbus-1.10.8.tar.gz -> dbus-1.10.10.tar.gz ++++++ ++++ 2268 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.10.8/NEWS new/dbus-1.10.10/NEWS --- old/dbus-1.10.8/NEWS 2016-03-07 17:06:12.000000000 +0100 +++ new/dbus-1.10.10/NEWS 2016-08-15 20:58:20.000000000 +0200 @@ -1,3 +1,51 @@ +D-Bus 1.10.10 (2016-08-15) +== + +The “tungsten door” release. + +Fixes: + +• On Linux, when dbus-daemon is run with reduced susceptibility to the + OOM killer (typically via systemd), do not let child processes inherit + that setting (fd.o #32851; Kimmo Hämäläinen, WaLyong Cho) + +• Output valid shell syntax in ~/.dbus/session-bus/ if the bus address + contains a semicolon (fd.o #94746, Thiago Macieira) + +• Fix memory leaks and thread safety in subprocess starting on Windows + (fd.o #95191, Ralf Habacker) + +• Do not require systemd to have a service file if using it for activation + (fd.o #93194; Simon McVittie; backport from 1.11.0) + +• Stop test-dbus-daemon incorrectly failing on platforms that cannot + discover the process ID of clients (fd.o #96653, Руслан Ижбулатов) + +• In tests that exercise correct handling of crashing D-Bus services, + suppress Windows crash handler (fd.o #95155; Yiyang Fei, Ralf Habacker) + +• Explicitly check for stdint.h (Ioan-Adrian Ratiu) + +• update-activation-environment: produce better diagnostics on error + (fd.o #96653, Simon McVittie) + +• Don't fail the build with an unused const variable warning under gcc 6 + (fd.o #97282; Thomas Zimmermann, Simon McVittie) + +• Merge dbus-1.10-ci branch, containing backports from 1.11.0 in build/test + code to support continuous integration (fd.o #93194, Simon McVittie) + + · Avoid -Wunused-label when compiling with libselinux but no libaudit + · In development builds, allow OOM tests to be disabled as documented + · Accept and ignore the --tap argument in all "embedded tests", and run + all automated tests with that argument for better diagnostics + · Fix the systemd activation test under CMake by installing the required + files + · In Automake, fix shell syntax for installcheck-local with no DESTDIR + · In Automake, don't try to run manual tests in installcheck + · In CMake, don't run manual-tcp test as an automated test + · Add travis-ci.org build machinery + D-Bus 1.10.8 (2016-03-07) == 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.10.8/bus/activation.c new/dbus-1.10.10/bus/activation.c --- old/dbus-1.10.8/bus/activation.c 2016-03-07 17:03:00.000000000 +0100 +++ new/dbus-1.10.10/bus/activation.c 2016-08-12 10:50:00.000000000 +0200 @@ -1418,7 +1418,8 @@ { BusPendingActivation *p = _dbus_hash_iter_get_value (&iter); - if (p != pending_activation && strcmp (p->exec, pending_activation->exec) == 0) + if (p != pending_activation && p->exec != NULL && + strcmp (p->exec, pending_activation->exec) == 0) pending_activation_failed (p, &error); } @@ -1744,9 +1745,19 @@ return FALSE; } - entry = activation_find_entry (activation, service_name, error); - if (!entry) - return FALSE; + if (bus_context_get_systemd_activation (activation->context) && + strcmp (service_name, "org.freedesktop.systemd1") == 0) + { + /* if we're doing systemd activation, we assume systemd will connect + * eventually, and it does not need a .service file */ + entry = NULL; + } + else + { + entry = activation_find_entry (activation, service_name, error); + if (!entry) + return FALSE; + } /* Bypass the registry lookup if we're auto-activating, bus_dispatch would not * call us if the service is already active. @@ -1853,17 +1864,20 @@ return FALSE; } - pending_activation->exec = _dbus_strdup (entry->exec); - if (!pending_activation->exec) + if (entry != NULL) { - _dbus_verbose ("Failed to copy service exec for pending activation\n"); - BUS_SET_OOM (error); - bus_pending_activation_unref (pending_activation); - bus_pending_activation_entry_free (pending_activation_entry); - return FALSE; + pending_activation->exec = _dbus_strdup (entry->exec); + if (!pending_activation->exec) + { + _dbus_verbose ("Failed to copy service exec for pending activation\n"); + BUS_SET_OOM (error); + bus_pending_activation_unref (pending_activation); + bus_pending_activation_entry_free (pending_activation_entry); + return FALSE; + } } - if (entry->systemd_service) + if (entry != NULL && entry->systemd_service != NULL) { pending_activation->systemd_service = _dbus_strdup (entry->systemd_service); if (!pending_activation->systemd_service) @@ -2055,6 +2069,11 @@ proceed with traditional activation. */ } + /* If entry was NULL, it would be because we were doing systemd activation + * and activating systemd itself; but we already handled that case with + * an early-return */ + _dbus_assert (entry != NULL); + /* use command as system and session different */ if (!_dbus_string_init (&command)) { 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.10.8/bus/main.c new/dbus-1.10.10/bus/main.c --- old/dbus-1.10.8/bus/main.c 2015-11-23 22:53:42.000000000 +0100 +++ new/dbus-1.10.10/bus/main.c 2016-08-15 20:55:42.000000000 +0200 @@ -42,6 +42,10 @@ #include "apparmor.h" #include "audit.h" +#ifdef DBUS_UNIX +#include <dbus/dbus-sysdeps-unix.h> +#endif + static BusContext *context; #ifdef DBUS_UNIX @@ -378,6 +382,27 @@ dbus_bool_t print_address; dbus_bool_t print_pid; BusContextFlags flags; +#ifdef DBUS_UNIX + const char *error_str; + + /* Redirect stdin from /dev/null since we will never need it, and + * redirect stdout and stderr to /dev/null if not already open. + * + * We should do this as the very first thing, to ensure that when we + * create other file descriptors (for example for epoll, inotify or + * a socket), they never get assigned as fd 0, 1 or 2. If they were, + * which could happen if our caller had (incorrectly) closed those + * standard fds, they'd get closed when we daemonize - for example, + * closing our listening socket would stop us listening, and closing + * a Linux epoll socket would cause the main loop to fail. */ + if (!_dbus_ensure_standard_fds (DBUS_FORCE_STDIN_NULL, &error_str)) + { + fprintf (stderr, + "dbus-daemon: fatal error setting up standard fds: %s: %s\n", + error_str, _dbus_strerror (errno)); + return 1; + } +#endif if (!_dbus_string_init (&config_file)) return 1; 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.10.8/bus/selinux.c new/dbus-1.10.10/bus/selinux.c --- old/dbus-1.10.8/bus/selinux.c 2016-03-07 17:03:00.000000000 +0100 +++ new/dbus-1.10.10/bus/selinux.c 2016-08-12 10:50:00.000000000 +0200 @@ -146,7 +146,9 @@ vsyslog (LOG_USER | LOG_INFO, fmt, ap); +#ifdef HAVE_LIBAUDIT out: +#endif va_end(ap); } 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.10.8/bus/test-launch-helper.c new/dbus-1.10.10/bus/test-launch-helper.c --- old/dbus-1.10.8/bus/test-launch-helper.c 2016-03-07 17:03:00.000000000 +0100 +++ new/dbus-1.10.10/bus/test-launch-helper.c 2016-08-12 10:50:00.000000000 +0200 @@ -102,7 +102,7 @@ const char *dir; DBusString config_file; - if (argc > 1) + if (argc > 1 && strcmp (argv[1], "--tap") != 0) dir = argv[1]; else dir = _dbus_getenv ("DBUS_TEST_DATA"); 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.10.8/bus/test-main.c new/dbus-1.10.10/bus/test-main.c --- old/dbus-1.10.8/bus/test-main.c 2016-03-07 17:03:00.000000000 +0100 +++ new/dbus-1.10.10/bus/test-main.c 2016-08-12 10:50:00.000000000 +0200 @@ -95,7 +95,7 @@ progname = argv[0]; - if (argc > 1) + if (argc > 1 && strcmp (argv[1], "--tap") != 0) dir = argv[1]; else dir = _dbus_getenv ("DBUS_TEST_DATA"); 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.10.8/bus/test-system.c new/dbus-1.10.10/bus/test-system.c --- old/dbus-1.10.8/bus/test-system.c 2016-03-07 17:03:00.000000000 +0100 +++ new/dbus-1.10.10/bus/test-system.c 2016-08-12 10:50:00.000000000 +0200 @@ -73,7 +73,7 @@ progname = argv[0]; - if (argc > 1) + if (argc > 1 && strcmp (argv[1], "--tap") != 0) dir = argv[1]; else dir = _dbus_getenv ("DBUS_TEST_DATA"); 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.10.8/cmake/i686-w64-mingw32.cmake new/dbus-1.10.10/cmake/i686-w64-mingw32.cmake --- old/dbus-1.10.8/cmake/i686-w64-mingw32.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/dbus-1.10.10/cmake/i686-w64-mingw32.cmake 2016-08-12 10:50:00.000000000 +0200 @@ -0,0 +1,20 @@ +# Toolchain for mingw-w64 32-bit compilers, as shipped in Debian/Ubuntu. + +set(GNU_HOST i686-w64-mingw32) +set(CMAKE_SYSTEM_PROCESSOR "i686") + +set(COMPILER_PREFIX "${GNU_HOST}-") + +set(CMAKE_SYSTEM_NAME "Windows") +set(CMAKE_CROSSCOMPILING TRUE) +set(WIN32 TRUE) +set(MINGW TRUE) + +include(CMakeForceCompiler) +cmake_force_c_compiler(${COMPILER_PREFIX}gcc GNU) +cmake_force_cxx_compiler(${COMPILER_PREFIX}g++ GNU) +set(CMAKE_RC_COMPILER ${COMPILER_PREFIX}windres) + +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 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.10.8/cmake/modules/Macros.cmake new/dbus-1.10.10/cmake/modules/Macros.cmake --- old/dbus-1.10.8/cmake/modules/Macros.cmake 2016-03-07 17:03:00.000000000 +0100 +++ new/dbus-1.10.10/cmake/modules/Macros.cmake 2016-08-12 10:50:00.000000000 +0200 @@ -43,11 +43,11 @@ # run tests with binfmt_misc set(PREFIX "z:") set(_env "DBUS_TEST_DAEMON=${PREFIX}${CMAKE_BINARY_DIR}/bin/dbus-daemon${EXEEXT}") - add_test(NAME ${_target} COMMAND $<TARGET_FILE:${_target}>) + add_test(NAME ${_target} COMMAND $<TARGET_FILE:${_target}> --tap) else() set(PREFIX) set(_env "DBUS_TEST_DAEMON=${CMAKE_BINARY_DIR}/bin/dbus-daemon${EXEEXT}") - add_test(NAME ${_target} COMMAND $<TARGET_FILE:${_target}>) + add_test(NAME ${_target} COMMAND $<TARGET_FILE:${_target}> --tap) endif() list(APPEND _env "DBUS_SESSION_BUS_ADDRESS=") list(APPEND _env "DBUS_FATAL_WARNINGS=1") 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.10.8/cmake/test/CMakeLists.txt new/dbus-1.10.10/cmake/test/CMakeLists.txt --- old/dbus-1.10.8/cmake/test/CMakeLists.txt 2016-03-07 17:03:00.000000000 +0100 +++ new/dbus-1.10.10/cmake/test/CMakeLists.txt 2016-08-12 10:50:00.000000000 +0200 @@ -72,7 +72,7 @@ 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}) +add_helper_executable(manual-tcp ${manual-tcp_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) if(WIN32) add_helper_executable(manual-paths ${manual-paths_SOURCES} ${DBUS_INTERNAL_LIBRARIES}) endif() @@ -119,6 +119,7 @@ test/data/incomplete-messages test/data/auth test/data/sha-1 + test/data/systemd-activation test/data/valid-config-files test/data/valid-config-files/basic.d test/data/valid-config-files/session.d 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.10.8/configure.ac new/dbus-1.10.10/configure.ac --- old/dbus-1.10.8/configure.ac 2016-03-07 17:06:22.000000000 +0100 +++ new/dbus-1.10.10/configure.ac 2016-08-15 20:59:02.000000000 +0200 @@ -3,7 +3,7 @@ m4_define([dbus_major_version], [1]) m4_define([dbus_minor_version], [10]) -m4_define([dbus_micro_version], [8]) +m4_define([dbus_micro_version], [10]) 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]) @@ -38,7 +38,7 @@ ## increment any time the source changes; set to ## 0 if you increment CURRENT -LT_REVISION=6 +LT_REVISION=7 ## increment if any interfaces have been added; set to 0 ## if any interfaces have been changed or removed. removal has @@ -699,6 +699,8 @@ AC_CHECK_HEADERS(unistd.h) +AC_CHECK_HEADERS([stdint.h]) + AC_CHECK_HEADERS(ws2tcpip.h) AC_CHECK_HEADERS(alloca.h) 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.10.8/dbus/dbus-auth.c new/dbus-1.10.10/dbus/dbus-auth.c --- old/dbus-1.10.8/dbus/dbus-auth.c 2015-09-30 16:48:40.000000000 +0200 +++ new/dbus-1.10.10/dbus/dbus-auth.c 2016-08-12 11:11:31.000000000 +0200 @@ -282,6 +282,9 @@ static const DBusAuthStateData client_state_waiting_for_data = { "WaitingForData", handle_client_state_waiting_for_data }; +/* The WaitingForOK state doesn't appear to be used. + * See https://bugs.freedesktop.org/show_bug.cgi?id=97298 */ +_DBUS_GNUC_UNUSED static const DBusAuthStateData client_state_waiting_for_ok = { "WaitingForOK", handle_client_state_waiting_for_ok }; 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.10.8/dbus/dbus-internals.c new/dbus-1.10.10/dbus/dbus-internals.c --- old/dbus-1.10.8/dbus/dbus-internals.c 2016-03-07 17:03:00.000000000 +0100 +++ new/dbus-1.10.10/dbus/dbus-internals.c 2016-08-12 10:50:00.000000000 +0200 @@ -1066,6 +1066,12 @@ max_failures_to_try = 4; } + if (max_failures_to_try < 1) + { + _dbus_verbose ("not testing OOM handling\n"); + return TRUE; + } + i = setting ? max_failures_to_try - 1 : 1; while (i < max_failures_to_try) { 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.10.8/dbus/dbus-internals.h new/dbus-1.10.10/dbus/dbus-internals.h --- old/dbus-1.10.8/dbus/dbus-internals.h 2016-03-02 19:52:34.000000000 +0100 +++ new/dbus-1.10.10/dbus/dbus-internals.h 2016-07-11 12:15:34.000000000 +0200 @@ -124,6 +124,7 @@ # define _dbus_is_verbose() FALSE #endif /* !DBUS_ENABLE_VERBOSE_MODE */ +DBUS_PRIVATE_EXPORT void _dbus_trace_ref (const char *obj_name, void *obj, int old_refcount, 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.10.8/dbus/dbus-spawn-win.c new/dbus-1.10.10/dbus/dbus-spawn-win.c --- old/dbus-1.10.8/dbus/dbus-spawn-win.c 2015-11-17 21:28:51.000000000 +0100 +++ new/dbus-1.10.10/dbus/dbus-spawn-win.c 2016-07-11 12:15:34.000000000 +0200 @@ -60,7 +60,7 @@ */ struct DBusBabysitter { - int refcount; + DBusAtomic refcount; HANDLE start_sync_event; #ifdef DBUS_ENABLE_EMBEDDED_TESTS @@ -91,16 +91,33 @@ int child_status; }; +static void +_dbus_babysitter_trace_ref (DBusBabysitter *sitter, + int old_refcount, + int new_refcount, + const char *why) +{ +#ifdef DBUS_ENABLE_VERBOSE_MODE + static int enabled = -1; + + _dbus_trace_ref ("DBusBabysitter", sitter, old_refcount, new_refcount, why, + "DBUS_BABYSITTER_TRACE", &enabled); +#endif +} + static DBusBabysitter* _dbus_babysitter_new (void) { DBusBabysitter *sitter; + dbus_int32_t old_refcount; sitter = dbus_new0 (DBusBabysitter, 1); if (sitter == NULL) return NULL; - sitter->refcount = 1; + old_refcount = _dbus_atomic_inc (&sitter->refcount); + + _dbus_babysitter_trace_ref (sitter, old_refcount, old_refcount+1, __FUNCTION__); sitter->start_sync_event = CreateEvent (NULL, FALSE, FALSE, NULL); if (sitter->start_sync_event == NULL) @@ -148,11 +165,13 @@ DBusBabysitter * _dbus_babysitter_ref (DBusBabysitter *sitter) { + dbus_int32_t old_refcount; PING(); _dbus_assert (sitter != NULL); - _dbus_assert (sitter->refcount > 0); - sitter->refcount += 1; + old_refcount = _dbus_atomic_inc (&sitter->refcount); + _dbus_assert (old_refcount > 0); + _dbus_babysitter_trace_ref (sitter, old_refcount, old_refcount+1, __FUNCTION__); return sitter; } @@ -187,14 +206,16 @@ _dbus_babysitter_unref (DBusBabysitter *sitter) { int i; + dbus_int32_t old_refcount; PING(); _dbus_assert (sitter != NULL); - _dbus_assert (sitter->refcount > 0); - sitter->refcount -= 1; + old_refcount = _dbus_atomic_dec (&sitter->refcount); + _dbus_assert (old_refcount > 0); + _dbus_babysitter_trace_ref (sitter, old_refcount, old_refcount-1, __FUNCTION__); - if (sitter->refcount == 0) + if (old_refcount == 1) { close_socket_to_babysitter (sitter); @@ -584,10 +605,9 @@ { int ret = 0; DBusBabysitter *sitter = (DBusBabysitter *) parameter; + HANDLE handle; PING(); - _dbus_babysitter_ref (sitter); - if (sitter->child_setup) { PING(); @@ -597,11 +617,14 @@ _dbus_verbose ("babysitter: spawning %s\n", sitter->log_name); PING(); - sitter->child_handle = spawn_program (sitter->log_name, - sitter->argv, sitter->envp); + handle = spawn_program (sitter->log_name, sitter->argv, sitter->envp); PING(); - if (sitter->child_handle == (HANDLE) -1) + if (handle != INVALID_HANDLE_VALUE) + { + sitter->child_handle = handle; + } + else { sitter->child_handle = NULL; sitter->have_spawn_errno = TRUE; @@ -659,7 +682,8 @@ _DBUS_ASSERT_ERROR_IS_CLEAR (error); _dbus_assert (argv[0] != NULL); - *sitter_p = NULL; + if (sitter_p != NULL) + *sitter_p = NULL; PING(); sitter = _dbus_babysitter_new (); @@ -727,7 +751,7 @@ PING(); sitter_thread = (HANDLE) CreateThread (NULL, 0, babysitter, - sitter, 0, &sitter_thread_id); + _dbus_babysitter_ref (sitter), 0, &sitter_thread_id); if (sitter_thread == 0) { 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.10.8/dbus/dbus-spawn.c new/dbus-1.10.10/dbus/dbus-spawn.c --- old/dbus-1.10.8/dbus/dbus-spawn.c 2015-09-30 16:48:40.000000000 +0200 +++ new/dbus-1.10.10/dbus/dbus-spawn.c 2016-07-11 12:15:34.000000000 +0200 @@ -1354,6 +1354,26 @@ } else if (grandchild_pid == 0) { +#ifdef __linux__ + int fd = -1; + +#ifdef O_CLOEXEC + fd = open ("/proc/self/oom_score_adj", O_WRONLY | O_CLOEXEC); +#endif + + if (fd < 0) + { + fd = open ("/proc/self/oom_score_adj", O_WRONLY); + _dbus_fd_set_close_on_exec (fd); + } + + if (fd >= 0) + { + if (write (fd, "0", sizeof (char)) < 0) + _dbus_warn ("writing oom_score_adj error: %s\n", strerror (errno)); + _dbus_close (fd, NULL); + } +#endif /* Go back to ignoring SIGPIPE, since it's evil */ signal (SIGPIPE, SIG_IGN); 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.10.8/dbus/dbus-sysdeps-unix.c new/dbus-1.10.10/dbus/dbus-sysdeps-unix.c --- old/dbus-1.10.8/dbus/dbus-sysdeps-unix.c 2015-09-30 16:48:40.000000000 +0200 +++ new/dbus-1.10.10/dbus/dbus-sysdeps-unix.c 2016-08-15 20:55:42.000000000 +0200 @@ -134,6 +134,81 @@ #endif /* Solaris */ +/** + * Ensure that the standard file descriptors stdin, stdout and stderr + * are open, by opening /dev/null if necessary. + * + * This function does not use DBusError, to avoid calling malloc(), so + * that it can be used in contexts where an async-signal-safe function + * is required (for example after fork()). Instead, on failure it sets + * errno and returns something like "Failed to open /dev/null" in + * *error_str_p. Callers are expected to combine *error_str_p + * with _dbus_strerror (errno) to get a full error report. + * + * This function can only be called while single-threaded: either during + * startup of an executable, or after fork(). + */ +dbus_bool_t +_dbus_ensure_standard_fds (DBusEnsureStandardFdsFlags flags, + const char **error_str_p) +{ + static int const relevant_flag[] = { DBUS_FORCE_STDIN_NULL, + DBUS_FORCE_STDOUT_NULL, + DBUS_FORCE_STDERR_NULL }; + /* Should always get replaced with the real error before use */ + const char *error_str = "Failed mysteriously"; + int devnull = -1; + int saved_errno; + /* This function relies on the standard fds having their POSIX values. */ + _DBUS_STATIC_ASSERT (STDIN_FILENO == 0); + _DBUS_STATIC_ASSERT (STDOUT_FILENO == 1); + _DBUS_STATIC_ASSERT (STDERR_FILENO == 2); + int i; + + for (i = STDIN_FILENO; i <= STDERR_FILENO; i++) + { + /* Because we rely on being single-threaded, and we want the + * standard fds to not be close-on-exec, we don't set it + * close-on-exec. */ + if (devnull < i) + devnull = open ("/dev/null", O_RDWR); + + if (devnull < 0) + { + error_str = "Failed to open /dev/null"; + goto out; + } + + /* We already opened all fds < i, so the only way this assertion + * could fail is if another thread closed one, and we document + * this function as not safe for multi-threading. */ + _dbus_assert (devnull >= i); + + if (devnull != i && (flags & relevant_flag[i]) != 0) + { + if (dup2 (devnull, i) < 0) + { + error_str = "Failed to dup2 /dev/null onto a standard fd"; + goto out; + } + } + } + + error_str = NULL; + +out: + saved_errno = errno; + + if (devnull > STDERR_FILENO) + close (devnull); + + if (error_str_p != NULL) + *error_str_p = error_str; + + errno = saved_errno; + return (error_str == NULL); +} + static dbus_bool_t _dbus_set_fd_nonblocking (int fd, DBusError *error); 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.10.8/dbus/dbus-sysdeps-unix.h new/dbus-1.10.10/dbus/dbus-sysdeps-unix.h --- old/dbus-1.10.8/dbus/dbus-sysdeps-unix.h 2015-11-23 22:47:51.000000000 +0100 +++ new/dbus-1.10.10/dbus/dbus-sysdeps-unix.h 2016-08-15 20:55:42.000000000 +0200 @@ -154,6 +154,17 @@ DBUS_PRIVATE_EXPORT void _dbus_fd_set_close_on_exec (int fd); +typedef enum +{ + DBUS_FORCE_STDIN_NULL = (1 << 0), + DBUS_FORCE_STDOUT_NULL = (1 << 1), + DBUS_FORCE_STDERR_NULL = (1 << 2) +} DBusEnsureStandardFdsFlags; + +DBUS_PRIVATE_EXPORT +dbus_bool_t _dbus_ensure_standard_fds (DBusEnsureStandardFdsFlags flags, + const char **error_str_p); + /** @} */ DBUS_END_DECLS 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.10.8/dbus/dbus-sysdeps.h new/dbus-1.10.10/dbus/dbus-sysdeps.h --- old/dbus-1.10.8/dbus/dbus-sysdeps.h 2015-11-23 22:53:42.000000000 +0100 +++ new/dbus-1.10.10/dbus/dbus-sysdeps.h 2016-07-11 12:15:34.000000000 +0200 @@ -295,8 +295,11 @@ # undef DBUS_HAVE_ATOMIC_INT #endif +DBUS_PRIVATE_EXPORT dbus_int32_t _dbus_atomic_inc (DBusAtomic *atomic); +DBUS_PRIVATE_EXPORT dbus_int32_t _dbus_atomic_dec (DBusAtomic *atomic); +DBUS_PRIVATE_EXPORT dbus_int32_t _dbus_atomic_get (DBusAtomic *atomic); #ifdef DBUS_WIN 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.10.8/dbus/dbus-test-main.c new/dbus-1.10.10/dbus/dbus-test-main.c --- old/dbus-1.10.8/dbus/dbus-test-main.c 2016-03-07 17:03:00.000000000 +0100 +++ new/dbus-1.10.10/dbus/dbus-test-main.c 2016-08-12 10:50:00.000000000 +0200 @@ -51,7 +51,7 @@ setlocale(LC_ALL, ""); #endif - if (argc > 1) + if (argc > 1 && strcmp (argv[1], "--tap") != 0) test_data_dir = argv[1]; else test_data_dir = 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.10.8/m4/libtool.m4 new/dbus-1.10.10/m4/libtool.m4 --- old/dbus-1.10.8/m4/libtool.m4 2016-03-07 17:07:28.000000000 +0100 +++ new/dbus-1.10.10/m4/libtool.m4 2016-08-15 20:59:31.000000000 +0200 @@ -728,7 +728,6 @@ cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. 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.10.8/test/Makefile.am new/dbus-1.10.10/test/Makefile.am --- old/dbus-1.10.8/test/Makefile.am 2016-03-07 17:03:00.000000000 +0100 +++ new/dbus-1.10.10/test/Makefile.am 2016-08-15 20:55:42.000000000 +0200 @@ -124,6 +124,7 @@ testexecdir = $(libexecdir)/installed-tests/dbus testmetadir = $(datadir)/installed-tests/dbus +dist_testexec_SCRIPTS = testexec_PROGRAMS = testmeta_DATA = @@ -133,8 +134,10 @@ $(NULL) installable_manual_tests = \ manual-dir-iter \ - manual-tcp \ - $(NULL) + manual-tcp \ + $(NULL) +dist_installable_test_scripts = \ + $(NULL) if DBUS_WIN installable_manual_tests += manual-paths @@ -160,6 +163,19 @@ installable_tests += \ test-sd-activation \ $(NULL) + +dist_installable_test_scripts += \ + test-dbus-daemon-fork.sh \ + $(NULL) + +# Testing dbus-launch relies on special code in that binary. +if DBUS_ENABLE_EMBEDDED_TESTS +dist_installable_test_scripts += \ + test-dbus-launch-eval.sh \ + test-dbus-launch-x11.sh \ + $(NULL) +endif DBUS_ENABLE_EMBEDDED_TESTS + endif DBUS_UNIX installable_manual_tests += \ @@ -167,13 +183,22 @@ $(NULL) endif DBUS_WITH_GLIB -installable_test_meta = $(installable_tests:=.test) -installable_test_meta_with_config = $(installable_tests:=_with_config.test) +installable_test_meta = \ + $(dist_installable_test_scripts:=.test) \ + $(installable_tests:=.test) \ + $(NULL) +installable_test_meta_with_config = \ + $(dist_installable_test_scripts:=_with_config.test) \ + $(installable_tests:=_with_config.test) \ + $(NULL) installcheck_tests = installcheck_environment = \ export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \ export DBUS_TEST_DAEMON=$(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT); \ + export DBUS_TEST_DBUS_LAUNCH=$(DESTDIR)$(bindir)/dbus-launch$(EXEEXT); \ + export DBUS_TEST_DBUS_MONITOR=$(DESTDIR)$(bindir)/dbus-monitor$(EXEEXT); \ + export DBUS_TEST_DBUS_SEND=$(DESTDIR)$(bindir)/dbus-send$(EXEEXT); \ export DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus; \ export DBUS_TEST_DATADIR=$(DESTDIR)$(datadir); \ ${NULL} @@ -182,6 +207,9 @@ export XDG_RUNTIME_DIR=@abs_top_builddir@/test/XDG_RUNTIME_DIR; \ export DBUS_FATAL_WARNINGS=1; \ export DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT); \ + export DBUS_TEST_DBUS_LAUNCH=@abs_top_builddir@/tools/dbus-launch$(EXEEXT); \ + export DBUS_TEST_DBUS_MONITOR=@abs_top_builddir@/tools/dbus-monitor$(EXEEXT); \ + export DBUS_TEST_DBUS_SEND=@abs_top_builddir@/tools/dbus-send$(EXEEXT); \ export DBUS_TEST_DATA=@abs_top_builddir@/test/data; \ export DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus; \ $(NULL) @@ -268,12 +296,16 @@ $(GLIB_LIBS) \ $(NULL) +TESTS += $(dist_installable_test_scripts) +installcheck_tests += $(dist_installable_test_scripts) + if DBUS_ENABLE_MODULAR_TESTS TESTS += $(installable_tests) installcheck_tests += $(installable_tests) if DBUS_ENABLE_INSTALLED_TESTS testexec_PROGRAMS += $(installable_tests) $(installable_manual_tests) + dist_testexec_SCRIPTS += $(dist_installable_test_scripts) testmeta_DATA += $(installable_test_meta) testmeta_DATA += $(installable_test_meta_with_config) @@ -294,7 +326,7 @@ $(installcheck_environment) \ $(srcdir)/dbus-test-runner \ $(testexecdir) \ - $(testexec_PROGRAMS) } + $(installable_tests); } endif DBUS_ENABLE_INSTALLED_TESTS in_data = \ 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.10.8/test/dbus-daemon.c new/dbus-1.10.10/test/dbus-daemon.c --- old/dbus-1.10.8/test/dbus-daemon.c 2015-09-30 16:48:40.000000000 +0200 +++ new/dbus-1.10.10/test/dbus-daemon.c 2016-07-11 12:15:34.000000000 +0200 @@ -526,7 +526,18 @@ while (m == NULL) test_main_context_iterate (f->ctx, TRUE); - if (dbus_message_get_args (m, &error, + if (dbus_set_error_from_message (&error, m)) + { + g_assert_cmpstr (error.name, ==, DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN); + +#ifdef PID_SHOULD_WORK + g_error ("Expected pid to be passed, but got %s: %s", + error.name, error.message); +#endif + + dbus_error_free (&error); + } + else if (dbus_message_get_args (m, &error, DBUS_TYPE_UINT32, &pid, DBUS_TYPE_INVALID)) { @@ -545,14 +556,7 @@ } else { - g_assert_cmpstr (error.name, ==, DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN); - -#ifdef PID_SHOULD_WORK - g_error ("Expected pid to be passed, but got %s: %s", - error.name, error.message); -#endif - - dbus_error_free (&error); + g_error ("Unexpected error: %s: %s", error.name, error.message); } } 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.10.8/test/spawn-test.c new/dbus-1.10.10/test/spawn-test.c --- old/dbus-1.10.8/test/spawn-test.c 2015-09-30 16:48:40.000000000 +0200 +++ new/dbus-1.10.10/test/spawn-test.c 2016-07-11 12:15:34.000000000 +0200 @@ -16,7 +16,7 @@ { char **argv_copy; int i; - DBusError error; + DBusError error = DBUS_ERROR_INIT; if (argc < 2) { 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.10.8/test/test-dbus-daemon-fork.sh new/dbus-1.10.10/test/test-dbus-daemon-fork.sh --- old/dbus-1.10.8/test/test-dbus-daemon-fork.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/dbus-1.10.10/test/test-dbus-daemon-fork.sh 2016-08-15 20:55:42.000000000 +0200 @@ -0,0 +1,107 @@ +#!/bin/sh + +# Copyright © 2016 Collabora Ltd. +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation files +# (the "Software"), to deal in the Software without restriction, +# including without limitation the rights to use, copy, modify, merge, +# publish, distribute, sublicense, and/or sell copies of the Software, +# and to permit persons to whom the Software is furnished to do so, +# subject to the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +set -e + +export DBUS_DEBUG_OUTPUT=1 +export DBUS_USE_TEST_BINARY=1 +echo "# dbus-daemon binary: ${DBUS_TEST_DAEMON:=dbus-daemon}" +echo "# dbus-send binary: ${DBUS_TEST_DBUS_SEND:=dbus-send}" + +if test -n "$DBUS_TEST_DATA"; then + echo "# test data: $DBUS_TEST_DATA" + config="--config-file=$DBUS_TEST_DATA/valid-config-files/session.conf" +elif test -n "$DBUS_TEST_DATADIR"; then + echo "# datadir: $DBUS_TEST_DATADIR" + config="--config-file=$DBUS_TEST_DATADIR/dbus-1/session.conf" +else + echo "# using standard session bus configuration" + config="--session" +fi + +if ! workdir="$(mktemp -d)"; then + echo "1..0 # SKIP - mktemp -d doesn't work" + exit 0 +fi + +echo "1..3" + +unset DBUS_SESSION_BUS_ADDRESS +unset DBUS_SESSION_BUS_PID +rm -f "$workdir"/address "$workdir"/pid + +${DBUS_TEST_DAEMON} --fork --print-address=8 --print-pid=9 "$config" \ + 8>"$workdir/address" 9>"$workdir/pid" + +export DBUS_SESSION_BUS_ADDRESS="$(cat "$workdir"/address)" +test -n "$DBUS_SESSION_BUS_ADDRESS" +DBUS_SESSION_BUS_PID="$(cat "$workdir"/pid)" +kill -0 "$DBUS_SESSION_BUS_PID" + +${DBUS_TEST_DBUS_SEND} --session --dest=org.freedesktop.DBus \ + --type=method_call --print-reply / org.freedesktop.DBus.ListNames >&2 + +kill "$DBUS_SESSION_BUS_PID" + +echo "ok 1 - normal dbus-daemon" + +unset DBUS_SESSION_BUS_ADDRESS +unset DBUS_SESSION_BUS_PID +rm -f "$workdir"/address "$workdir"/pid + +${DBUS_TEST_DAEMON} --fork --print-address=8 --print-pid=9 "$config" \ + 8>"$workdir/address" 9>"$workdir/pid" <&- + +export DBUS_SESSION_BUS_ADDRESS="$(cat "$workdir"/address)" +test -n "$DBUS_SESSION_BUS_ADDRESS" +DBUS_SESSION_BUS_PID="$(cat "$workdir"/pid)" +kill -0 "$DBUS_SESSION_BUS_PID" + +${DBUS_TEST_DBUS_SEND} --session --dest=org.freedesktop.DBus \ + --type=method_call --print-reply / org.freedesktop.DBus.ListNames >&2 + +kill "$DBUS_SESSION_BUS_PID" + +echo "ok 2 - dbus-daemon with stdin closed" + +unset DBUS_SESSION_BUS_ADDRESS +unset DBUS_SESSION_BUS_PID +rm -f "$workdir"/address "$workdir"/pid + +${DBUS_TEST_DAEMON} --fork --print-address=8 --print-pid=9 "$config" \ + 8>"$workdir/address" 9>"$workdir/pid" <&- >&- 2>&- + +export DBUS_SESSION_BUS_ADDRESS="$(cat "$workdir"/address)" +test -n "$DBUS_SESSION_BUS_ADDRESS" +DBUS_SESSION_BUS_PID="$(cat "$workdir"/pid)" +kill -0 "$DBUS_SESSION_BUS_PID" + +${DBUS_TEST_DBUS_SEND} --session --dest=org.freedesktop.DBus \ + --type=method_call --print-reply / org.freedesktop.DBus.ListNames >&2 + +kill "$DBUS_SESSION_BUS_PID" + +echo "ok 3 - dbus-daemon with stdin, stdout, stderr closed" + +rm -r "$workdir" 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.10.8/test/test-dbus-launch-eval.sh new/dbus-1.10.10/test/test-dbus-launch-eval.sh --- old/dbus-1.10.8/test/test-dbus-launch-eval.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/dbus-1.10.10/test/test-dbus-launch-eval.sh 2016-08-15 20:55:42.000000000 +0200 @@ -0,0 +1,103 @@ +#!/bin/sh + +# Copyright © 2016 Collabora Ltd. +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation files +# (the "Software"), to deal in the Software without restriction, +# including without limitation the rights to use, copy, modify, merge, +# publish, distribute, sublicense, and/or sell copies of the Software, +# and to permit persons to whom the Software is furnished to do so, +# subject to the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +set -e + +export DBUS_DEBUG_OUTPUT=1 +export DBUS_USE_TEST_BINARY=1 +echo "# dbus-daemon binary: ${DBUS_TEST_DAEMON:=dbus-daemon}" +echo "# dbus-launch binary: ${DBUS_TEST_DBUS_LAUNCH:=dbus-launch}" +echo "# dbus-send binary: ${DBUS_TEST_DBUS_SEND:=dbus-send}" + +if test -n "$DBUS_TEST_DATA"; then + echo "# test data: $DBUS_TEST_DATA" + config="--config-file=$DBUS_TEST_DATA/valid-config-files/session.conf" +elif test -n "$DBUS_TEST_DATADIR"; then + echo "# datadir: $DBUS_TEST_DATADIR" + config="--config-file=$DBUS_TEST_DATADIR/dbus-1/session.conf" +else + echo "# using standard session bus configuration" + # add a harmless command-line argument + config="--sh-syntax" +fi + +echo "1..3" + +unset DBUS_SESSION_BUS_ADDRESS +unset DBUS_SESSION_BUS_PID + +eval "$(${DBUS_TEST_DBUS_LAUNCH} --sh-syntax "$config")" + +test -n "$DBUS_SESSION_BUS_ADDRESS" +env | grep '^DBUS_SESSION_BUS_ADDRESS=' + +test -n "$DBUS_SESSION_BUS_PID" +test "x$(env | grep '^DBUS_SESSION_BUS_PID=')" = "x" +kill -0 "$DBUS_SESSION_BUS_PID" + +${DBUS_TEST_DBUS_SEND} --session --dest=org.freedesktop.DBus \ + --type=method_call --print-reply / org.freedesktop.DBus.ListNames >&2 + +kill "$DBUS_SESSION_BUS_PID" + +echo "ok 1 - normal dbus-launch" + +unset DBUS_SESSION_BUS_ADDRESS +unset DBUS_SESSION_BUS_PID + +eval "$(${DBUS_TEST_DBUS_LAUNCH} --sh-syntax "$config" <&-)" + +test -n "$DBUS_SESSION_BUS_ADDRESS" +env | grep '^DBUS_SESSION_BUS_ADDRESS=' + +test -n "$DBUS_SESSION_BUS_PID" +test "x$(env | grep '^DBUS_SESSION_BUS_PID=')" = "x" +kill -0 "$DBUS_SESSION_BUS_PID" + +${DBUS_TEST_DBUS_SEND} --session --dest=org.freedesktop.DBus \ + --type=method_call --print-reply / org.freedesktop.DBus.ListNames >&2 + +kill "$DBUS_SESSION_BUS_PID" + +echo "ok 2 - dbus-launch with stdin closed" + +unset DBUS_SESSION_BUS_ADDRESS +unset DBUS_SESSION_BUS_PID + +# we can't close stdout because that breaks --sh-syntax +eval "$(${DBUS_TEST_DBUS_LAUNCH} --sh-syntax "$config" <&- 2>&-)" + +test -n "$DBUS_SESSION_BUS_ADDRESS" +env | grep '^DBUS_SESSION_BUS_ADDRESS=' + +test -n "$DBUS_SESSION_BUS_PID" +test "x$(env | grep '^DBUS_SESSION_BUS_PID=')" = "x" +kill -0 "$DBUS_SESSION_BUS_PID" + +${DBUS_TEST_DBUS_SEND} --session --dest=org.freedesktop.DBus \ + --type=method_call --print-reply / org.freedesktop.DBus.ListNames >&2 + +kill "$DBUS_SESSION_BUS_PID" + +echo "ok 3 - dbus-launch with stdin and stderr closed" 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.10.8/test/test-dbus-launch-x11.sh new/dbus-1.10.10/test/test-dbus-launch-x11.sh --- old/dbus-1.10.8/test/test-dbus-launch-x11.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/dbus-1.10.10/test/test-dbus-launch-x11.sh 2016-08-15 20:55:42.000000000 +0200 @@ -0,0 +1,255 @@ +#!/bin/sh + +# Copyright © 2016 Collabora Ltd. +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation files +# (the "Software"), to deal in the Software without restriction, +# including without limitation the rights to use, copy, modify, merge, +# publish, distribute, sublicense, and/or sell copies of the Software, +# and to permit persons to whom the Software is furnished to do so, +# subject to the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +set -e +set -x + +export DBUS_DEBUG_OUTPUT=1 +export DBUS_USE_TEST_BINARY=1 +echo "# dbus-daemon binary: ${DBUS_TEST_DAEMON:=dbus-daemon}" +echo "# dbus-launch binary: ${DBUS_TEST_DBUS_LAUNCH:=dbus-launch}" +echo "# dbus-monitor binary: ${DBUS_TEST_DBUS_LAUNCH:=dbus-monitor}" +echo "# dbus-send binary: ${DBUS_TEST_DBUS_SEND:=dbus-send}" + +if test -n "$DBUS_TEST_DATA"; then + echo "# test data: $DBUS_TEST_DATA" + bus_config="--config-file=$DBUS_TEST_DATA/valid-config-files/session.conf" + launch_config="$bus_config" +elif test -n "$DBUS_TEST_DATADIR"; then + echo "# datadir: $DBUS_TEST_DATADIR" + bus_config="--config-file=$DBUS_TEST_DATADIR/dbus-1/session.conf" + launch_config="$bus_config" +else + echo "# using standard session bus configuration" + bus_config="--session" + # dbus-launch doesn't accept --session so add a harmless command-line + # argument + launch_config="--sh-syntax" +fi + +if ! workdir="$(mktemp -d)"; then + echo "1..0 # SKIP - mktemp -d doesn't work" + exit 0 +fi + +if ! xvfb-run --auto-servernum true; then + echo "1..0 # SKIP - xvfb-run doesn't work" + exit 0 +fi + +test_num=0 +x_session_pid= +unset DISPLAY +unset XAUTHORITY + +start_xvfb () { + rm -f "$workdir/display" + rm -f "$workdir/ready" + rm -f "$workdir/x-session-pid" + rm -f "$workdir/xauthority" + rm -f "$workdir/xvfb-done" + + # Run an X session in the background for up to 5 minutes. + ( + set +e + xvfb-run --auto-servernum \ + sh -c 'echo "$$" > "$1/x-session-pid"; echo "$XAUTHORITY" > "$1/xauthority"; echo "$DISPLAY" > "$1/display"; touch "$1/ready"; exec sleep 300' \ + sh "$workdir" + touch "$workdir/xvfb-done" + ) & + + tries=0 + while ! [ -e "$workdir/ready" ]; do + if [ $tries -ge 10 ]; then + echo "# Failed to start xvfb-run within $tries seconds" + exit 1 + fi + tries=$(($tries + 1)) + sleep 1 + done + + x_session_pid="$(cat "$workdir/x-session-pid")" + export DISPLAY="$(cat "$workdir/display")" + export XAUTHORITY="$(cat "$workdir/xauthority")" + kill -0 "$x_session_pid" +} + +test_disconnection () { + rm -f "$workdir/disconnected" + ( + set +e + ${DBUS_TEST_DBUS_MONITOR} > "$workdir/dbus-monitor.log" 2>&1 + touch "$workdir/disconnected" + ) & + + kill "$x_session_pid" + + tries=0 + while ! [ -e "$workdir/disconnected" ]; do + if [ $tries -ge 10 ]; then + echo "# dbus-monitor was not disconnected within $tries seconds" >&2 + exit 1 + fi + tries=$(($tries + 1)) + sleep 1 + done + + tries=0 + while ! [ -e "$workdir/xvfb-done" ]; do + if [ $tries -ge 10 ]; then + echo "# xvfb-run did not exit within $tries seconds" >&2 + exit 1 + fi + tries=$(($tries + 1)) + sleep 1 + done +} + +test_exit_with_x11 () { + unset DBUS_SESSION_BUS_ADDRESS + unset DBUS_SESSION_BUS_PID + unset DBUS_SESSION_BUS_WINDOWID + + start_xvfb + eval "$($DBUS_TEST_DBUS_LAUNCH --sh-syntax --exit-with-session "$launch_config" </dev/null)" + + test -n "$DBUS_SESSION_BUS_ADDRESS" + env | grep '^DBUS_SESSION_BUS_ADDRESS=' + + test -n "$DBUS_SESSION_BUS_PID" + test "x$(env | grep '^DBUS_SESSION_BUS_PID=')" = "x" + kill -0 "$DBUS_SESSION_BUS_PID" + + test -n "$DBUS_SESSION_BUS_WINDOWID" + test "x$(env | grep '^DBUS_SESSION_BUS_WINDOWID=')" = "x" + + ${DBUS_TEST_DBUS_SEND} --session --dest=org.freedesktop.DBus \ + --type=method_call --print-reply / org.freedesktop.DBus.ListNames >&2 + + test_disconnection + + test_num=$(($test_num + 1)) + echo "ok ${test_num} - dbus-launch --exit-with-session" +} + +test_autolaunch () { + unset DBUS_SESSION_BUS_ADDRESS + unset DBUS_SESSION_BUS_PID + unset DBUS_SESSION_BUS_WINDOWID + unset XDG_RUNTIME_DIR + fake_uuid="ffffffffffffffffffffffffffffffff" + + start_xvfb + eval "$($DBUS_TEST_DBUS_LAUNCH --sh-syntax --autolaunch=${fake_uuid} "$launch_config" </dev/null)" + + test -n "$DBUS_SESSION_BUS_ADDRESS" + env | grep '^DBUS_SESSION_BUS_ADDRESS=' + + test -n "$DBUS_SESSION_BUS_PID" + test "x$(env | grep '^DBUS_SESSION_BUS_PID=')" = "x" + kill -0 "$DBUS_SESSION_BUS_PID" + + test -n "$DBUS_SESSION_BUS_WINDOWID" + test "x$(env | grep '^DBUS_SESSION_BUS_WINDOWID=')" = "x" + + # It is idempotent + old_address="$DBUS_SESSION_BUS_ADDRESS" + old_pid="$DBUS_SESSION_BUS_PID" + old_window="$DBUS_SESSION_BUS_WINDOWID" + eval "$($DBUS_TEST_DBUS_LAUNCH --sh-syntax --autolaunch=${fake_uuid} "$launch_config" </dev/null)" + test "$DBUS_SESSION_BUS_ADDRESS" = "$old_address" + test "$DBUS_SESSION_BUS_PID" = "$old_pid" + test "$DBUS_SESSION_BUS_WINDOWID" = "$old_window" + + ${DBUS_TEST_DBUS_SEND} --session --dest=org.freedesktop.DBus \ + --type=method_call --print-reply / org.freedesktop.DBus.ListNames >&2 + + test_disconnection + + test_num=$(($test_num + 1)) + echo "ok ${test_num} - dbus-launch --autolaunch" +} + +test_xdg_runtime_dir () { + unset DBUS_SESSION_BUS_ADDRESS + unset DBUS_SESSION_BUS_PID + unset DBUS_SESSION_BUS_WINDOWID + export XDG_RUNTIME_DIR="$workdir" + fake_uuid="ffffffffffffffffffffffffffffffff" + + if echo "$workdir" | grep '[^0-9A-Za-z_-/.]'; then + test_num=$(($test_num + 1)) + echo "ok ${test_num} # SKIP - $workdir would need escaping" + return + fi + + ${DBUS_TEST_DAEMON} "$bus_config" --address="unix:path=$XDG_RUNTIME_DIR/bus" --print-pid=9 --fork 9>"$workdir/bus-pid" + bus_pid="$(cat "$workdir/bus-pid")" + kill -0 "$bus_pid" + + start_xvfb + eval "$($DBUS_TEST_DBUS_LAUNCH --sh-syntax --autolaunch=${fake_uuid} "$launch_config" </dev/null)" + + env | grep '^DBUS_SESSION_BUS_ADDRESS=' + test "$DBUS_SESSION_BUS_ADDRESS" = "unix:path=$XDG_RUNTIME_DIR/bus" + + # When dbus-launch picks up the address from XDG_RUNTIME_DIR/bus, it + # doesn't know the pid + test -z "$DBUS_SESSION_BUS_PID" + + # It still knows which window it stashed the information in + test -n "$DBUS_SESSION_BUS_WINDOWID" + test "x$(env | grep '^DBUS_SESSION_BUS_WINDOWID=')" = "x" + + ${DBUS_TEST_DBUS_SEND} --session --dest=org.freedesktop.DBus \ + --type=method_call --print-reply / org.freedesktop.DBus.ListNames >&2 + + kill "$x_session_pid" + + tries=0 + while ! [ -e "$workdir/xvfb-done" ]; do + if [ $tries -ge 10 ]; then + echo "# xvfb-run did not exit within $tries seconds" >&2 + exit 1 + fi + tries=$(($tries + 1)) + sleep 1 + done + + # dbus-launch has gone but the dbus-daemon is still alive + ${DBUS_TEST_DBUS_SEND} --session --dest=org.freedesktop.DBus \ + --type=method_call --print-reply / org.freedesktop.DBus.ListNames >&2 + + kill "$bus_pid" + + test_num=$(($test_num + 1)) + echo "ok ${test_num} - dbus-launch --autolaunch with XDG_RUNTIME_DIR" +} + +echo "1..3" +test_exit_with_x11 +test_autolaunch +test_xdg_runtime_dir + +# vim:set sw=4 sts=4 et: 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.10.8/test/test-segfault.c new/dbus-1.10.10/test/test-segfault.c --- old/dbus-1.10.8/test/test-segfault.c 2015-09-30 16:48:40.000000000 +0200 +++ new/dbus-1.10.10/test/test-segfault.c 2016-07-11 12:15:34.000000000 +0200 @@ -13,11 +13,37 @@ #include <sys/prctl.h> #endif +#ifdef DBUS_WIN +#include <stdio.h> +#include <windows.h> + +int +exception_handler(LPEXCEPTION_POINTERS p); + +/* Explicit Windows exception handlers needed to supress OS popups */ +int +exception_handler(LPEXCEPTION_POINTERS p) +{ + fprintf(stderr, "test-segfault: raised fatal exception as intended\n"); + ExitProcess(0xc0000005); +} +#endif + int main (int argc, char **argv) { char *p; +#ifdef DBUS_WIN + /* Disable Windows popup dialog when an app crashes so that app quits + * immediately with error code instead of waiting for user to dismiss + * the dialog. */ + DWORD dwMode = SetErrorMode(SEM_NOGPFAULTERRORBOX); + SetErrorMode(dwMode | SEM_NOGPFAULTERRORBOX); + /* Disable "just in time" debugger */ + SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)&exception_handler); +#endif + #if HAVE_SETRLIMIT /* No core dumps please, we know we crashed. */ struct rlimit r = { 0, }; 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.10.8/tools/dbus-launch-x11.c new/dbus-1.10.10/tools/dbus-launch-x11.c --- old/dbus-1.10.8/tools/dbus-launch-x11.c 2015-09-30 16:48:40.000000000 +0200 +++ new/dbus-1.10.10/tools/dbus-launch-x11.c 2016-07-11 12:15:34.000000000 +0200 @@ -414,7 +414,7 @@ "# If the DBUS_SESSION_BUS_ADDRESS environment variable is set, it will\n" "# be used rather than this file.\n" "# See \"man dbus-launch\" for more details.\n" - "DBUS_SESSION_BUS_ADDRESS=%s\n" + "DBUS_SESSION_BUS_ADDRESS='%s'\n" "DBUS_SESSION_BUS_PID=%ld\n" "DBUS_SESSION_BUS_WINDOWID=%ld\n", get_machine_uuid (), 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.10.8/tools/dbus-launch.c new/dbus-1.10.10/tools/dbus-launch.c --- old/dbus-1.10.8/tools/dbus-launch.c 2015-09-30 16:48:40.000000000 +0200 +++ new/dbus-1.10.10/tools/dbus-launch.c 2016-08-15 20:55:42.000000000 +0200 @@ -842,10 +842,25 @@ char *config_file; dbus_bool_t user_bus_supported = FALSE; DBusString user_bus; - + const char *error_str; + exit_with_session = FALSE; config_file = NULL; - + + /* Ensure that the first three fds are open, to ensure that when we + * create other file descriptors (for example for epoll, inotify or + * a socket), they never get assigned as fd 0, 1 or 2. If they were, + * which could happen if our caller had (incorrectly) closed those + * standard fds, then we'd start dbus-daemon with those fds closed, + * which is unexpected and could cause it to misbehave. */ + if (!_dbus_ensure_standard_fds (0, &error_str)) + { + fprintf (stderr, + "dbus-launch: fatal error setting up standard fds: %s: %s\n", + error_str, _dbus_strerror (errno)); + return 1; + } + prev_arg = NULL; i = 1; while (i < argc) 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.10.8/tools/dbus-update-activation-environment.c new/dbus-1.10.10/tools/dbus-update-activation-environment.c --- old/dbus-1.10.8/tools/dbus-update-activation-environment.c 2015-09-30 16:48:40.000000000 +0200 +++ new/dbus-1.10.10/tools/dbus-update-activation-environment.c 2016-08-12 10:50:00.000000000 +0200 @@ -378,7 +378,8 @@ exit (EX_UNAVAILABLE); } - if (!dbus_message_get_args (msg, &error, DBUS_TYPE_INVALID)) + if (dbus_set_error_from_message (&error, msg) || + !dbus_message_get_args (msg, &error, DBUS_TYPE_INVALID)) { fprintf (stderr, "%s: error from dbus-daemon: %s: %s\n", @@ -402,7 +403,8 @@ "%s: warning: error sending to systemd: %s: %s\n", PROGNAME, error.name, error.message); } - else if (!dbus_message_get_args (msg, &error, DBUS_TYPE_INVALID)) + else if (dbus_set_error_from_message (&error, msg) || + !dbus_message_get_args (msg, &error, DBUS_TYPE_INVALID)) { fprintf (stderr, "%s: warning: error from systemd: %s: %s\n",
