Hello community, here is the log from the commit of package dbus-1 for openSUSE:Factory checked in at 2013-11-04 09:11:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2013-10-10 11:26:02.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.dbus-1.new/dbus-1-x11.changes 2013-11-04 09:11:38.000000000 +0100 @@ -1,0 +2,25 @@ +Fri Nov 1 21:31:19 UTC 2013 - [email protected] + +- Update to 1.7.8 + + Dependencies: + - If systemd support is enabled, libsystemd-journal is + now required. + + Enhancements: + - When activating a non-systemd service under systemd, + annotate its stdout/stderr with its bus name in the Journal. + Known limitation: because the socket is opened before forking, + the process will still be logged as if it had dbus-daemon's + process ID and user ID. (fdo#68559) + - Document more configuration elements in dbus-daemon(1) + (fdo#69125) + + Fixes: + - Don't leak string arrays or fds if + dbus_message_iter_get_args_valist() unpacks them and then + encounters an error (fdo#21259) + - If compiled with libaudit, retain CAP_AUDIT_WRITE so we + can write disallowed method calls to the audit log, + fixing a regression in 1.7.6 (fdo#49062) + - path_namespace='/' in match rules incorrectly matched nothing; + it now matches everything. (fdo#70799) + +------------------------------------------------------------------- dbus-1.changes: same change Old: ---- dbus-1.7.6.tar.gz New: ---- dbus-1.7.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dbus-1-x11.spec ++++++ --- /var/tmp/diff_new_pack.yeN5P2/_old 2013-11-04 09:11:40.000000000 +0100 +++ /var/tmp/diff_new_pack.yeN5P2/_new 2013-11-04 09:11:40.000000000 +0100 @@ -49,7 +49,7 @@ BuildRequires: libexpat-devel BuildRequires: libtool BuildRequires: pkg-config -Version: 1.7.6 +Version: 1.7.8 Release: 0 # Source0: http://dbus.freedesktop.org/releases/dbus/%{_name}-%{version}.tar.gz dbus-1.spec: same change ++++++ dbus-1.7.6.tar.gz -> dbus-1.7.8.tar.gz ++++++ ++++ 7705 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.7.6/NEWS new/dbus-1.7.8/NEWS --- old/dbus-1.7.6/NEWS 2013-10-09 12:29:15.000000000 +0200 +++ new/dbus-1.7.8/NEWS 2013-11-01 20:16:53.000000000 +0100 @@ -1,3 +1,35 @@ +D-Bus 1.7.8 (2013-11-01) +== + +The “extreme hills” release. + +Dependencies: + +• If systemd support is enabled, libsystemd-journal is now required. + +Enhancements: + +• When activating a non-systemd service under systemd, annotate its + stdout/stderr with its bus name in the Journal. Known limitation: + because the socket is opened before forking, the process will still be + logged as if it had dbus-daemon's process ID and user ID. + (fd.o #68559, Chengwei Yang) + +• Document more configuration elements in dbus-daemon(1) + (fd.o #69125, Chengwei Yang) + +Fixes: + +• Don't leak string arrays or fds if dbus_message_iter_get_args_valist() + unpacks them and then encounters an error (fd.o #21259, Chengwei Yang) + +• If compiled with libaudit, retain CAP_AUDIT_WRITE so we can write + disallowed method calls to the audit log, fixing a regression in 1.7.6 + (fd.o #49062, Colin Walters) + +• path_namespace='/' in match rules incorrectly matched nothing; it + now matches everything. (fd.o #70799, Simon McVittie) + D-Bus 1.7.6 (2013-10-09) == 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.7.6/bus/activation.c new/dbus-1.7.8/bus/activation.c --- old/dbus-1.7.6/bus/activation.c 2013-10-09 11:51:19.000000000 +0200 +++ new/dbus-1.7.8/bus/activation.c 2013-11-01 13:39:42.000000000 +0100 @@ -2104,7 +2104,9 @@ dbus_error_init (&tmp_error); - if (!_dbus_spawn_async_with_babysitter (&pending_activation->babysitter, argv, + if (!_dbus_spawn_async_with_babysitter (&pending_activation->babysitter, + service_name, + argv, envp, NULL, activation, &tmp_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.7.6/bus/connection.c new/dbus-1.7.8/bus/connection.c --- old/dbus-1.7.6/bus/connection.c 2013-02-18 15:15:10.000000000 +0100 +++ new/dbus-1.7.8/bus/connection.c 2013-11-01 13:05:37.000000000 +0100 @@ -2126,6 +2126,16 @@ } static void +transaction_free (BusTransaction *transaction) +{ + _dbus_assert (transaction->connections == NULL); + + free_cancel_hooks (transaction); + + dbus_free (transaction); +} + +static void connection_cancel_transaction (DBusConnection *connection, BusTransaction *transaction) { @@ -2163,14 +2173,10 @@ while ((connection = _dbus_list_pop_first (&transaction->connections))) connection_cancel_transaction (connection, transaction); - _dbus_assert (transaction->connections == NULL); - _dbus_list_foreach (&transaction->cancel_hooks, cancel_hook_cancel, NULL); - free_cancel_hooks (transaction); - - dbus_free (transaction); + transaction_free (transaction); } static void @@ -2224,11 +2230,7 @@ while ((connection = _dbus_list_pop_first (&transaction->connections))) connection_execute_transaction (connection, transaction); - _dbus_assert (transaction->connections == NULL); - - free_cancel_hooks (transaction); - - dbus_free (transaction); + transaction_free (transaction); } static void 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.7.6/bus/main.c new/dbus-1.7.8/bus/main.c --- old/dbus-1.7.6/bus/main.c 2013-10-08 19:40:39.000000000 +0200 +++ new/dbus-1.7.8/bus/main.c 2013-11-01 13:05:37.000000000 +0100 @@ -61,7 +61,6 @@ { switch (sig) { -#ifdef SIGHUP case SIGHUP: { DBusString str; @@ -94,7 +93,6 @@ } } break; -#endif case SIGTERM: { @@ -642,9 +640,7 @@ * no point in trying to make the handler portable to non-Unix. */ _dbus_set_signal_handler (SIGTERM, signal_handler); -#ifdef SIGHUP _dbus_set_signal_handler (SIGHUP, signal_handler); -#endif #endif /* DBUS_UNIX */ _dbus_verbose ("We are on D-Bus...\n"); 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.7.6/bus/selinux.c new/dbus-1.7.8/bus/selinux.c --- old/dbus-1.7.6/bus/selinux.c 2013-10-08 19:40:39.000000000 +0200 +++ new/dbus-1.7.8/bus/selinux.c 2013-11-01 20:13:20.000000000 +0100 @@ -1043,9 +1043,15 @@ if (_dbus_geteuid () == 0) { int rc; + int have_audit_write; + have_audit_write = capng_have_capability (CAPNG_PERMITTED, CAP_AUDIT_WRITE); capng_clear (CAPNG_SELECT_BOTH); - if (capng_have_capability (CAPNG_PERMITTED, CAP_AUDIT_WRITE)) + /* Only attempt to retain CAP_AUDIT_WRITE if we had it when + * starting. See: + * https://bugs.freedesktop.org/show_bug.cgi?id=49062#c9 + */ + if (have_audit_write) capng_update (CAPNG_ADD, CAPNG_EFFECTIVE | CAPNG_PERMITTED, CAP_AUDIT_WRITE); rc = capng_change_id (uid, gid, CAPNG_DROP_SUPP_GRP); 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.7.6/bus/signals.c new/dbus-1.7.8/bus/signals.c --- old/dbus-1.7.6/bus/signals.c 2013-10-08 19:40:39.000000000 +0200 +++ new/dbus-1.7.8/bus/signals.c 2013-10-23 18:15:56.000000000 +0200 @@ -1836,8 +1836,11 @@ * namespace, rather than just starting with that string, * by checking that the matched prefix is followed by a '/' * or the end of the path. + * + * Special case: the only valid path of length 1, "/", + * matches everything. */ - if (path[len] != '\0' && path[len] != '/') + if (len > 1 && path[len] != '\0' && path[len] != '/') return FALSE; } @@ -2717,6 +2720,7 @@ static const char* path_namespace_should_match_message_1[] = { + "type='signal',path_namespace='/'", "type='signal',path_namespace='/foo'", "type='signal',path_namespace='/foo/TheObjectManager'", NULL @@ -2731,6 +2735,7 @@ static const char* path_namespace_should_match_message_2[] = { + "type='signal',path_namespace='/'", "type='signal',path_namespace='/foo/TheObjectManager'", NULL }; @@ -2742,6 +2747,7 @@ static const char* path_namespace_should_match_message_3[] = { + "type='signal',path_namespace='/'", NULL }; @@ -2751,12 +2757,25 @@ NULL }; +static const char* +path_namespace_should_match_message_4[] = { + "type='signal',path_namespace='/'", + NULL +}; + +static const char* +path_namespace_should_not_match_message_4[] = { + "type='signal',path_namespace='/foo/TheObjectManager'", + NULL +}; + static void test_matching_path_namespace (void) { DBusMessage *message1; DBusMessage *message2; DBusMessage *message3; + DBusMessage *message4; message1 = dbus_message_new (DBUS_MESSAGE_TYPE_SIGNAL); _dbus_assert (message1 != NULL); @@ -2773,6 +2792,11 @@ if (!dbus_message_set_path (message3, "/foo/TheObjectManagerOther")) _dbus_assert_not_reached ("oom"); + message4 = dbus_message_new (DBUS_MESSAGE_TYPE_SIGNAL); + _dbus_assert (message4 != NULL); + if (!dbus_message_set_path (message4, "/")) + _dbus_assert_not_reached ("oom"); + check_matching (message1, 1, path_namespace_should_match_message_1, path_namespace_should_not_match_message_1); @@ -2782,7 +2806,11 @@ check_matching (message3, 3, path_namespace_should_match_message_3, path_namespace_should_not_match_message_3); + check_matching (message4, 4, + path_namespace_should_match_message_4, + path_namespace_should_not_match_message_4); + dbus_message_unref (message4); dbus_message_unref (message3); dbus_message_unref (message2); dbus_message_unref (message1); 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.7.6/config.h.in new/dbus-1.7.8/config.h.in --- old/dbus-1.7.6/config.h.in 2013-10-09 13:05:14.000000000 +0200 +++ new/dbus-1.7.8/config.h.in 2013-11-01 20:20:31.000000000 +0100 @@ -357,6 +357,9 @@ */ #undef LT_OBJDIR +/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +#undef NO_MINUS_C_MINUS_O + /* Name of package */ #undef PACKAGE 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.7.6/configure.ac new/dbus-1.7.8/configure.ac --- old/dbus-1.7.6/configure.ac 2013-10-09 12:29:20.000000000 +0200 +++ new/dbus-1.7.8/configure.ac 2013-11-01 20:14:36.000000000 +0100 @@ -3,7 +3,7 @@ m4_define([dbus_major_version], [1]) m4_define([dbus_minor_version], [7]) -m4_define([dbus_micro_version], [6]) +m4_define([dbus_micro_version], [8]) 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 @@ ## increment any time the source changes; set to ## 0 if you increment CURRENT -LT_REVISION=2 +LT_REVISION=3 ## increment if any interfaces have been added; set to 0 ## if any interfaces have been changed or removed. removal has @@ -1143,7 +1143,7 @@ have_systemd=no; else PKG_CHECK_MODULES(SYSTEMD, - [libsystemd-login >= 32, libsystemd-daemon >= 32], + [libsystemd-login >= 32, libsystemd-daemon >= 32, libsystemd-journal >= 32], have_systemd=yes, have_systemd=no) fi @@ -1774,6 +1774,7 @@ dbus-1-uninstalled.pc test/data/valid-config-files/debug-allow-all.conf test/data/valid-config-files/debug-allow-all-sha1.conf +test/data/valid-config-files/incoming-limit.conf test/data/valid-config-files-system/debug-allow-all-pass.conf test/data/valid-config-files-system/debug-allow-all-fail.conf test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service 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.7.6/dbus/dbus-bus.c new/dbus-1.7.8/dbus/dbus-bus.c --- old/dbus-1.7.6/dbus/dbus-bus.c 2013-10-08 19:40:39.000000000 +0200 +++ new/dbus-1.7.8/dbus/dbus-bus.c 2013-11-01 13:08:33.000000000 +0100 @@ -294,12 +294,6 @@ * the above code will work right */ - if (!dbus_setenv ("DBUS_ACTIVATION_ADDRESS", NULL)) - return FALSE; - - if (!dbus_setenv ("DBUS_ACTIVATION_BUS_TYPE", NULL)) - return FALSE; - if (!_dbus_register_shutdown_func (addresses_shutdown_func, NULL)) return FALSE; 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.7.6/dbus/dbus-message-util.c new/dbus-1.7.8/dbus/dbus-message-util.c --- old/dbus-1.7.6/dbus/dbus-message-util.c 2013-10-08 19:40:40.000000000 +0200 +++ new/dbus-1.7.8/dbus/dbus-message-util.c 2013-11-01 13:05:37.000000000 +0100 @@ -991,6 +991,161 @@ _dbus_assert_not_reached ("Didn't reach end of arguments"); } +static void +verify_test_message_args_ignored (DBusMessage *message) +{ + DBusMessageIter iter; + DBusError error = DBUS_ERROR_INIT; + dbus_uint32_t our_uint; + DBusInitialFDs *initial_fds; + + initial_fds = _dbus_check_fdleaks_enter (); + + /* parse with empty signature: "" */ + dbus_message_iter_init (message, &iter); + if (!dbus_message_iter_get_args (&iter, &error, + DBUS_TYPE_INVALID)) + { + _dbus_warn ("error: %s - %s\n", error.name, + (error.message != NULL) ? error.message : "no message"); + } + else + { + _dbus_assert (!dbus_error_is_set (&error)); + _dbus_verbose ("arguments ignored.\n"); + } + + /* parse with shorter signature: "u" */ + dbus_message_iter_init (message, &iter); + if (!dbus_message_iter_get_args (&iter, &error, + DBUS_TYPE_UINT32, &our_uint, + DBUS_TYPE_INVALID)) + { + _dbus_warn ("error: %s - %s\n", error.name, + (error.message != NULL) ? error.message : "no message"); + } + else + { + _dbus_assert (!dbus_error_is_set (&error)); + _dbus_verbose ("arguments ignored.\n"); + } + + _dbus_check_fdleaks_leave (initial_fds); +} + +static void +verify_test_message_memleak (DBusMessage *message) +{ + DBusMessageIter iter; + DBusError error = DBUS_ERROR_INIT; + dbus_uint32_t our_uint1; + dbus_uint32_t our_uint2; + dbus_uint32_t our_uint3; + char **our_string_array1; + int our_string_array_len1; + char **our_string_array2; + int our_string_array_len2; + int our_unix_fd1; + int our_unix_fd2; + DBusInitialFDs *initial_fds; + + initial_fds = _dbus_check_fdleaks_enter (); + + /* parse with wrong signature: "uashuu" */ + dbus_error_free (&error); + dbus_message_iter_init (message, &iter); + if (!dbus_message_iter_get_args (&iter, &error, + DBUS_TYPE_UINT32, &our_uint1, + DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, + &our_string_array1, &our_string_array_len1, +#ifdef HAVE_UNIX_FD_PASSING + DBUS_TYPE_UNIX_FD, &our_unix_fd1, +#endif + DBUS_TYPE_UINT32, &our_uint2, + DBUS_TYPE_UINT32, &our_uint3, + DBUS_TYPE_INVALID)) + { + _dbus_verbose ("expected error: %s - %s\n", error.name, + (error.message != NULL) ? error.message : "no message"); + /* ensure array of string and unix fd not leaked */ + _dbus_assert (our_string_array1 == NULL); +#ifdef HAVE_UNIX_FD_PASSING + _dbus_assert (our_unix_fd1 == -1); +#endif + } + else + { + _dbus_warn ("error: parse with wrong signature: 'uashuu'.\n"); + } + + /* parse with wrong signature: "uashuashu" */ + dbus_message_iter_init (message, &iter); + dbus_error_free (&error); + if (!dbus_message_iter_get_args (&iter, &error, + DBUS_TYPE_UINT32, &our_uint1, + DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, + &our_string_array1, &our_string_array_len1, +#ifdef HAVE_UNIX_FD_PASSING + DBUS_TYPE_UNIX_FD, &our_unix_fd1, +#endif + DBUS_TYPE_UINT32, &our_uint2, + DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, + &our_string_array2, &our_string_array_len2, +#ifdef HAVE_UNIX_FD_PASSING + DBUS_TYPE_UNIX_FD, &our_unix_fd2, +#endif + DBUS_TYPE_UINT32, &our_uint3, + DBUS_TYPE_INVALID)) + { + _dbus_verbose ("expected error: %s - %s\n", error.name, + (error.message != NULL) ? error.message : "no message"); + /* ensure array of string and unix fd not leaked */ + _dbus_assert (our_string_array1 == NULL); + _dbus_assert (our_string_array2 == NULL); +#ifdef HAVE_UNIX_FD_PASSING + _dbus_assert (our_unix_fd1 == -1); + _dbus_assert (our_unix_fd2 == -1); +#endif + } + else + { + _dbus_warn ("error: parse with wrong signature: 'uashuashu'.\n"); + } + + /* parse with correct signature: "uashuash" */ + dbus_message_iter_init (message, &iter); + dbus_error_free (&error); + if (!dbus_message_iter_get_args (&iter, &error, + DBUS_TYPE_UINT32, &our_uint1, + DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, + &our_string_array1, &our_string_array_len1, +#ifdef HAVE_UNIX_FD_PASSING + DBUS_TYPE_UNIX_FD, &our_unix_fd1, +#endif + DBUS_TYPE_UINT32, &our_uint2, + DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, + &our_string_array2, &our_string_array_len2, +#ifdef HAVE_UNIX_FD_PASSING + DBUS_TYPE_UNIX_FD, &our_unix_fd2, +#endif + DBUS_TYPE_INVALID)) + { + _dbus_warn ("error: %s - %s\n", error.name, + (error.message != NULL) ? error.message : "no message"); + _dbus_assert_not_reached ("Could not get arguments"); + } + else + { + dbus_free_string_array (our_string_array1); + dbus_free_string_array (our_string_array2); +#ifdef HAVE_UNIX_FD_PASSING + _dbus_close (our_unix_fd1, &error); + _dbus_close (our_unix_fd2, &error); +#endif + } + _dbus_check_fdleaks_leave (initial_fds); +} + /** * @ingroup DBusMessageInternals * Unit test for DBusMessage. @@ -1020,7 +1175,9 @@ const dbus_uint64_t *v_ARRAY_UINT64 = our_uint64_array; const dbus_int64_t *v_ARRAY_INT64 = our_int64_array; const char *our_string_array[] = { "Foo", "bar", "", "woo woo woo woo" }; + const char *our_string_array1[] = { "foo", "Bar", "", "Woo woo Woo woo" }; const char **v_ARRAY_STRING = our_string_array; + const char **v1_ARRAY_STRING = our_string_array1; const double our_double_array[] = { 0.1234, 9876.54321, -300.0 }; const double *v_ARRAY_DOUBLE = our_double_array; const unsigned char our_byte_array[] = { 'a', 'b', 'c', 234 }; @@ -1035,6 +1192,7 @@ dbus_uint16_t v_UINT16; dbus_int32_t v_INT32; dbus_uint32_t v_UINT32; + dbus_uint32_t v1_UINT32; dbus_int64_t v_INT64; dbus_uint64_t v_UINT64; unsigned char v_BYTE; @@ -1043,6 +1201,7 @@ DBusMessageIter iter, array_iter, struct_iter; #ifdef HAVE_UNIX_FD_PASSING int v_UNIX_FD; + int v1_UNIX_FD; #endif char **decomposed; DBusInitialFDs *initial_fds; @@ -1194,6 +1353,7 @@ v2_BYTE = 24; #ifdef HAVE_UNIX_FD_PASSING v_UNIX_FD = 1; + v1_UNIX_FD = 2; #endif dbus_message_append_args (message, @@ -1463,6 +1623,51 @@ dbus_message_unref (message); + /* Check we should not leak array of string or unix fd, fd.o#21259 */ + message = dbus_message_new_method_call ("org.freedesktop.DBus.TestService", + "/org/freedesktop/TestPath", + "Foo.TestInterface", + "Method"); + + /* signature "uashuash" */ + dbus_message_append_args (message, + DBUS_TYPE_UINT32, &v_UINT32, + DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &v_ARRAY_STRING, + _DBUS_N_ELEMENTS (our_string_array), +#ifdef HAVE_UNIX_FD_PASSING + DBUS_TYPE_UNIX_FD, &v_UNIX_FD, +#endif + DBUS_TYPE_UINT32, &v1_UINT32, + DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &v1_ARRAY_STRING, + _DBUS_N_ELEMENTS (our_string_array1), +#ifdef HAVE_UNIX_FD_PASSING + DBUS_TYPE_UNIX_FD, &v1_UNIX_FD, +#endif + + DBUS_TYPE_INVALID); + + i = 0; + sig[i++] = DBUS_TYPE_UINT32; + sig[i++] = DBUS_TYPE_ARRAY; + sig[i++] = DBUS_TYPE_STRING; +#ifdef HAVE_UNIX_FD_PASSING + sig[i++] = DBUS_TYPE_UNIX_FD; +#endif + sig[i++] = DBUS_TYPE_UINT32; + sig[i++] = DBUS_TYPE_ARRAY; + sig[i++] = DBUS_TYPE_STRING; +#ifdef HAVE_UNIX_FD_PASSING + sig[i++] = DBUS_TYPE_UNIX_FD; +#endif + sig[i++] = DBUS_TYPE_INVALID; + + _dbus_assert (i < (int) _DBUS_N_ELEMENTS (sig)); + + verify_test_message_args_ignored (message); + verify_test_message_memleak (message); + + dbus_message_unref (message); + /* Load all the sample messages from the message factory */ { DBusMessageDataIter diter; 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.7.6/dbus/dbus-message.c new/dbus-1.7.8/dbus/dbus-message.c --- old/dbus-1.7.6/dbus/dbus-message.c 2013-10-08 19:40:40.000000000 +0200 +++ new/dbus-1.7.8/dbus/dbus-message.c 2013-11-01 13:05:37.000000000 +0100 @@ -784,8 +784,6 @@ * dbus_message_get_args() is the place to go for complete * documentation. * - * @todo This may leak memory and file descriptors if parsing fails. See #21259 - * * @see dbus_message_get_args * @param iter the message iter * @param error error to be filled in @@ -802,6 +800,7 @@ DBusMessageRealIter *real = (DBusMessageRealIter *)iter; int spec_type, msg_type, i, j; dbus_bool_t retval; + va_list copy_args; _dbus_assert (_dbus_message_iter_check (real)); @@ -810,12 +809,17 @@ spec_type = first_arg_type; i = 0; + /* copy var_args first, then we can do another iteration over it to + * free memory and close unix fds if parse failed at some point. + */ + va_copy (copy_args, var_args); + while (spec_type != DBUS_TYPE_INVALID) { msg_type = dbus_message_iter_get_arg_type (iter); if (msg_type != spec_type) - { + { dbus_set_error (error, DBUS_ERROR_INVALID_ARGS, "Argument %d is specified to be of type \"%s\", but " "is actually of type \"%s\"\n", i, @@ -823,7 +827,7 @@ _dbus_type_to_string (msg_type)); goto out; - } + } if (spec_type == DBUS_TYPE_UNIX_FD) { @@ -982,21 +986,81 @@ } #endif + /* how many arguments already handled */ + i++; + spec_type = va_arg (var_args, int); if (!_dbus_type_reader_next (&real->u.reader) && spec_type != DBUS_TYPE_INVALID) { dbus_set_error (error, DBUS_ERROR_INVALID_ARGS, - "Message has only %d arguments, but more were expected", i + 1); + "Message has only %d arguments, but more were expected", i); goto out; } - - i++; } retval = TRUE; out: + /* there may memory or unix fd leak in the above iteration if parse failed. + * so we have another iteration over copy_args to free memory and close + * unix fds. + */ + if (!retval) + { + spec_type = first_arg_type; + j = 0; + + while (j < i) + { + if (spec_type == DBUS_TYPE_UNIX_FD) + { +#ifdef HAVE_UNIX_FD_PASSING + int *pfd; + + pfd = va_arg (copy_args, int *); + _dbus_assert(pfd); + if (*pfd >= 0) + { + _dbus_close (*pfd, NULL); + *pfd = -1; + } +#endif + } + else if (dbus_type_is_basic (spec_type)) + { + /* move the index forward */ + va_arg (copy_args, DBusBasicValue *); + } + else if (spec_type == DBUS_TYPE_ARRAY) + { + int spec_element_type; + + spec_element_type = va_arg (copy_args, int); + if (dbus_type_is_fixed (spec_element_type)) + { + /* move the index forward */ + va_arg (copy_args, const DBusBasicValue **); + va_arg (copy_args, int *); + } + else if (_DBUS_TYPE_IS_STRINGLIKE (spec_element_type)) + { + char ***str_array_p; + + str_array_p = va_arg (copy_args, char ***); + /* move the index forward */ + va_arg (copy_args, int *); + _dbus_assert (str_array_p != NULL); + dbus_free_string_array (*str_array_p); + *str_array_p = NULL; + } + } + + spec_type = va_arg (copy_args, int); + j++; + } + } + va_end (copy_args); return retval; } 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.7.6/dbus/dbus-spawn-win.c new/dbus-1.7.8/dbus/dbus-spawn-win.c --- old/dbus-1.7.6/dbus/dbus-spawn-win.c 2013-10-08 19:40:40.000000000 +0200 +++ new/dbus-1.7.8/dbus/dbus-spawn-win.c 2013-11-01 13:39:42.000000000 +0100 @@ -68,7 +68,7 @@ HANDLE end_sync_event; #endif - char *executable; + char *log_name; DBusSpawnChildSetupFunc child_setup; void *user_data; @@ -258,7 +258,7 @@ } #endif - dbus_free (sitter->executable); + dbus_free (sitter->log_name); dbus_free (sitter); } @@ -337,7 +337,7 @@ char *emsg = _dbus_win_error_string (sitter->spawn_errno); dbus_set_error (error, DBUS_ERROR_SPAWN_EXEC_FAILED, "Failed to execute program %s: %s", - sitter->executable, emsg); + sitter->log_name, emsg); _dbus_win_free_error_string (emsg); } else if (sitter->have_child_status) @@ -345,14 +345,14 @@ PING(); dbus_set_error (error, DBUS_ERROR_SPAWN_CHILD_EXITED, "Process %s exited with status %d", - sitter->executable, sitter->child_status); + sitter->log_name, sitter->child_status); } else { PING(); dbus_set_error (error, DBUS_ERROR_FAILED, "Process %s exited, status unknown", - sitter->executable); + sitter->log_name); } PING(); } @@ -593,10 +593,10 @@ (*sitter->child_setup) (sitter->user_data); } - _dbus_verbose ("babysitter: spawning %s\n", sitter->executable); + _dbus_verbose ("babysitter: spawning %s\n", sitter->log_name); PING(); - sitter->child_handle = spawn_program (sitter->executable, + sitter->child_handle = spawn_program (sitter->log_name, sitter->argv, sitter->envp); PING(); @@ -642,6 +642,7 @@ dbus_bool_t _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p, + const char *log_name, char **argv, char **envp, DBusSpawnChildSetupFunc child_setup, @@ -653,6 +654,7 @@ DWORD sitter_thread_id; _DBUS_ASSERT_ERROR_IS_CLEAR (error); + _dbus_assert (argv[0] != NULL); *sitter_p = NULL; @@ -667,8 +669,17 @@ sitter->child_setup = child_setup; sitter->user_data = user_data; - sitter->executable = _dbus_strdup (argv[0]); - if (sitter->executable == NULL) + sitter->log_name = _dbus_strdup (log_name); + if (sitter->log_name == NULL && log_name != NULL) + { + _DBUS_SET_OOM (error); + goto out0; + } + + if (sitter->log_name == NULL) + sitter->log_name = _dbus_strdup (argv[0]); + + if (sitter->log_name == NULL) { _DBUS_SET_OOM (error); goto out0; @@ -804,7 +815,7 @@ /*** Test launching nonexistent binary */ argv[0] = "/this/does/not/exist/32542sdgafgafdg"; - if (_dbus_spawn_async_with_babysitter (&sitter, argv, NULL, + if (_dbus_spawn_async_with_babysitter (&sitter, "spawn_nonexistent", argv, NULL, NULL, NULL, &error)) { @@ -857,7 +868,7 @@ return TRUE; } - if (_dbus_spawn_async_with_babysitter (&sitter, argv, NULL, + if (_dbus_spawn_async_with_babysitter (&sitter, "spawn_segfault", argv, NULL, NULL, NULL, &error)) { @@ -912,7 +923,7 @@ return TRUE; } - if (_dbus_spawn_async_with_babysitter (&sitter, argv, NULL, + if (_dbus_spawn_async_with_babysitter (&sitter, "spawn_exit", argv, NULL, NULL, NULL, &error)) { @@ -967,7 +978,7 @@ return TRUE; } - if (_dbus_spawn_async_with_babysitter (&sitter, argv, NULL, + if (_dbus_spawn_async_with_babysitter (&sitter, "spawn_and_kill", argv, NULL, NULL, NULL, &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.7.6/dbus/dbus-spawn.c new/dbus-1.7.8/dbus/dbus-spawn.c --- old/dbus-1.7.6/dbus/dbus-spawn.c 2013-10-08 19:40:40.000000000 +0200 +++ new/dbus-1.7.8/dbus/dbus-spawn.c 2013-11-01 13:49:52.000000000 +0100 @@ -38,6 +38,9 @@ #ifdef HAVE_ERRNO_H #include <errno.h> #endif +#ifdef HAVE_SYSTEMD +#include <systemd/sd-journal.h> +#endif extern char **environ; @@ -174,6 +177,48 @@ * and the grandchild. The grandchild is our spawned process. The intermediate * child is a babysitter process; it keeps track of when the grandchild * exits/crashes, and reaps the grandchild. + * + * We automatically reap the babysitter process, killing it if necessary, + * when the DBusBabysitter's refcount goes to zero. + * + * Processes: + * + * main process + * | fork() A + * \- babysitter + * | fork () B + * \- grandchild --> exec --> spawned process + * + * IPC: + * child_err_report_pipe + * /-----------<---------<--------------\ + * | ^ + * v | + * main process babysitter grandchild + * ^ ^ + * v v + * \-------<->-------/ + * babysitter_pipe + * + * child_err_report_pipe is genuinely a pipe. + * The READ_END (also called error_pipe_from_child) is used in the main + * process. The WRITE_END (also called child_err_report_fd) is used in + * the grandchild process. + * + * On failure, the grandchild process sends CHILD_EXEC_FAILED + errno. + * On success, the pipe just closes (because it's close-on-exec) without + * sending any bytes. + * + * babysitter_pipe is mis-named: it's really a bidirectional socketpair. + * The [0] end (also called socket_to_babysitter) is used in the main + * process, the [1] end (also called parent_pipe) is used in the babysitter. + * + * If the fork() labelled B in the diagram above fails, the babysitter sends + * CHILD_FORK_FAILED + errno. + * On success, the babysitter sends CHILD_PID + the grandchild's pid. + * On SIGCHLD, the babysitter sends CHILD_EXITED + the exit status. + * The main process doesn't explicitly send anything, but when it exits, + * the babysitter gets POLLHUP or POLLERR. */ /* Messages from children to parents */ @@ -192,7 +237,8 @@ { int refcount; /**< Reference count */ - char *executable; /**< executable name to use in error messages */ + char *log_name; /**< the name under which to log messages about this + process being spawned */ int socket_to_babysitter; /**< Connection to the babysitter process */ int error_pipe_from_child; /**< Connection to the process that does the exec() */ @@ -346,7 +392,7 @@ if (sitter->watches) _dbus_watch_list_free (sitter->watches); - dbus_free (sitter->executable); + dbus_free (sitter->log_name); dbus_free (sitter); } @@ -701,34 +747,34 @@ { dbus_set_error (error, DBUS_ERROR_SPAWN_EXEC_FAILED, "Failed to execute program %s: %s", - sitter->executable, _dbus_strerror (sitter->errnum)); + sitter->log_name, _dbus_strerror (sitter->errnum)); } else if (sitter->have_fork_errnum) { dbus_set_error (error, DBUS_ERROR_NO_MEMORY, "Failed to fork a new process %s: %s", - sitter->executable, _dbus_strerror (sitter->errnum)); + sitter->log_name, _dbus_strerror (sitter->errnum)); } else if (sitter->have_child_status) { if (WIFEXITED (sitter->status)) dbus_set_error (error, DBUS_ERROR_SPAWN_CHILD_EXITED, "Process %s exited with status %d", - sitter->executable, WEXITSTATUS (sitter->status)); + sitter->log_name, WEXITSTATUS (sitter->status)); else if (WIFSIGNALED (sitter->status)) dbus_set_error (error, DBUS_ERROR_SPAWN_CHILD_SIGNALED, "Process %s received signal %d", - sitter->executable, WTERMSIG (sitter->status)); + sitter->log_name, WTERMSIG (sitter->status)); else dbus_set_error (error, DBUS_ERROR_FAILED, "Process %s exited abnormally", - sitter->executable); + sitter->log_name); } else { dbus_set_error (error, DBUS_ERROR_FAILED, "Process %s exited, reason unknown", - sitter->executable); + sitter->log_name); } } @@ -810,9 +856,14 @@ #define WRITE_END 1 -/* Avoids a danger in threaded situations (calling close() - * on a file descriptor twice, and another thread has - * re-opened it since the first close) +/* Avoids a danger in re-entrant situations (calling close() + * on a file descriptor twice, and another module has + * re-opened it since the first close). + * + * This previously claimed to be relevant for threaded situations, but by + * trivial inspection, it is not thread-safe. It doesn't actually + * matter, since this module is only used in the -util variant of the + * library, which is only used in single-threaded situations. */ static int close_and_invalidate (int *fd) @@ -1118,8 +1169,7 @@ } /** - * Spawns a new process. The executable name and argv[0] - * are the same, both are provided in argv[0]. The child_setup + * Spawns a new process. The child_setup * function is passed the given user_data and is run in the child * just before calling exec(). * @@ -1129,8 +1179,9 @@ * If sitter_p is #NULL, no babysitter is kept. * * @param sitter_p return location for babysitter or #NULL + * @log_name the name under which to log messages about this process being spawned * @param argv the executable and arguments - * @param env the environment (not used on unix yet) + * @param env the environment, or #NULL to copy the parent's * @param child_setup function to call in child pre-exec() * @param user_data user data for setup function * @param error error object to be filled in if function fails @@ -1138,6 +1189,7 @@ */ dbus_bool_t _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p, + const char *log_name, char **argv, char **env, DBusSpawnChildSetupFunc child_setup, @@ -1148,8 +1200,13 @@ int child_err_report_pipe[2] = { -1, -1 }; int babysitter_pipe[2] = { -1, -1 }; pid_t pid; +#ifdef HAVE_SYSTEMD + int fd_out = -1; + int fd_err = -1; +#endif _DBUS_ASSERT_ERROR_IS_CLEAR (error); + _dbus_assert (argv[0] != NULL); if (sitter_p != NULL) *sitter_p = NULL; @@ -1163,8 +1220,17 @@ return FALSE; } - sitter->executable = _dbus_strdup (argv[0]); - if (sitter->executable == NULL) + sitter->log_name = _dbus_strdup (log_name); + if (sitter->log_name == NULL && log_name != NULL) + { + dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); + goto cleanup_and_fail; + } + + if (sitter->log_name == NULL) + sitter->log_name = _dbus_strdup (argv[0]); + + if (sitter->log_name == NULL) { dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL); goto cleanup_and_fail; @@ -1224,7 +1290,16 @@ } _DBUS_ASSERT_ERROR_IS_CLEAR (error); - + +#ifdef HAVE_SYSTEMD + /* This may fail, but it's not critical. + * In particular, if we were compiled with journald support but are now + * running on a non-systemd system, this is going to fail, so we + * have to cope gracefully. */ + fd_out = sd_journal_stream_fd (sitter->log_name, LOG_INFO, FALSE); + fd_err = sd_journal_stream_fd (sitter->log_name, LOG_WARNING, FALSE); +#endif + pid = fork (); if (pid < 0) @@ -1264,6 +1339,16 @@ */ signal (SIGPIPE, SIG_IGN); + close_and_invalidate (&babysitter_pipe[1]); +#ifdef HAVE_SYSTEMD + /* log to systemd journal if possible */ + if (fd_out >= 0) + dup2 (fd_out, STDOUT_FILENO); + if (fd_err >= 0) + dup2 (fd_err, STDERR_FILENO); + close_and_invalidate (&fd_out); + close_and_invalidate (&fd_err); +#endif do_exec (child_err_report_pipe[WRITE_END], argv, env, @@ -1272,6 +1357,11 @@ } else { + close_and_invalidate (&child_err_report_pipe[WRITE_END]); +#ifdef HAVE_SYSTEMD + close_and_invalidate (&fd_out); + close_and_invalidate (&fd_err); +#endif babysit (grandchild_pid, babysitter_pipe[1]); _dbus_assert_not_reached ("Got to code after babysit()"); } @@ -1281,6 +1371,10 @@ /* Close the uncared-about ends of the pipes */ close_and_invalidate (&child_err_report_pipe[WRITE_END]); close_and_invalidate (&babysitter_pipe[1]); +#ifdef HAVE_SYSTEMD + close_and_invalidate (&fd_out); + close_and_invalidate (&fd_err); +#endif sitter->socket_to_babysitter = babysitter_pipe[0]; babysitter_pipe[0] = -1; @@ -1310,6 +1404,10 @@ close_and_invalidate (&child_err_report_pipe[WRITE_END]); close_and_invalidate (&babysitter_pipe[0]); close_and_invalidate (&babysitter_pipe[1]); +#ifdef HAVE_SYSTEMD + close_and_invalidate (&fd_out); + close_and_invalidate (&fd_err); +#endif if (sitter != NULL) _dbus_babysitter_unref (sitter); @@ -1371,7 +1469,7 @@ /*** Test launching nonexistent binary */ argv[0] = "/this/does/not/exist/32542sdgafgafdg"; - if (_dbus_spawn_async_with_babysitter (&sitter, argv, + if (_dbus_spawn_async_with_babysitter (&sitter, "spawn_nonexistent", argv, NULL, NULL, NULL, &error)) { @@ -1420,7 +1518,7 @@ return TRUE; } - if (_dbus_spawn_async_with_babysitter (&sitter, argv, + if (_dbus_spawn_async_with_babysitter (&sitter, "spawn_segfault", argv, NULL, NULL, NULL, &error)) { @@ -1471,7 +1569,7 @@ return TRUE; } - if (_dbus_spawn_async_with_babysitter (&sitter, argv, + if (_dbus_spawn_async_with_babysitter (&sitter, "spawn_exit", argv, NULL, NULL, NULL, &error)) { @@ -1522,7 +1620,7 @@ return TRUE; } - if (_dbus_spawn_async_with_babysitter (&sitter, argv, + if (_dbus_spawn_async_with_babysitter (&sitter, "spawn_and_kill", argv, NULL, NULL, NULL, &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.7.6/dbus/dbus-spawn.h new/dbus-1.7.8/dbus/dbus-spawn.h --- old/dbus-1.7.6/dbus/dbus-spawn.h 2013-02-14 19:56:21.000000000 +0100 +++ new/dbus-1.7.8/dbus/dbus-spawn.h 2013-11-01 13:39:42.000000000 +0100 @@ -39,6 +39,7 @@ void *user_data); dbus_bool_t _dbus_spawn_async_with_babysitter (DBusBabysitter **sitter_p, + const char *log_name, char **argv, char **env, DBusSpawnChildSetupFunc child_setup, 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.7.6/doc/dbus-daemon.1.xml.in new/dbus-1.7.8/doc/dbus-daemon.1.xml.in --- old/dbus-1.7.6/doc/dbus-daemon.1.xml.in 2013-10-08 19:40:40.000000000 +0200 +++ new/dbus-1.7.8/doc/dbus-daemon.1.xml.in 2013-11-01 13:14:34.000000000 +0100 @@ -318,6 +318,37 @@ <itemizedlist remap='TP'> + <listitem><para><emphasis remap='I'><syslog></emphasis></para></listitem> + + +</itemizedlist> + +<para>If present, the bus daemon will log to syslog.</para> + +<itemizedlist remap='TP'> + + <listitem><para><emphasis remap='I'><pidfile></emphasis></para></listitem> + + +</itemizedlist> + +<para>If present, the bus daemon will write its pid to the specified file. +The --nopidfile command-line option takes precedence over this setting.</para> + +<itemizedlist remap='TP'> + + <listitem><para><emphasis remap='I'><allow_anonymous></emphasis></para></listitem> + + +</itemizedlist> + +<para>If present, connections that authenticated using the ANONYMOUS +mechanism will be authorized to connect. This option has no practical +effect unless the ANONYMOUS mechanism has also been enabled using the +<emphasis remap='I'><auth></emphasis> element, described below.</para> + +<itemizedlist remap='TP'> + <listitem><para><emphasis remap='I'><listen></emphasis></para></listitem> 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.7.6/test/Makefile.am new/dbus-1.7.8/test/Makefile.am --- old/dbus-1.7.6/test/Makefile.am 2013-10-08 19:40:40.000000000 +0200 +++ new/dbus-1.7.8/test/Makefile.am 2013-10-10 17:58:58.000000000 +0200 @@ -246,6 +246,7 @@ data/valid-config-files-system/debug-allow-all-pass.conf.in \ data/valid-config-files/debug-allow-all-sha1.conf.in \ data/valid-config-files/debug-allow-all.conf.in \ + data/valid-config-files/incoming-limit.conf.in \ data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoExec.service.in \ data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service.in \ data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service.in \ @@ -317,7 +318,6 @@ data/valid-config-files/basic.conf \ data/valid-config-files/basic.d/basic.conf \ data/valid-config-files/entities.conf \ - data/valid-config-files/incoming-limit.conf \ data/valid-config-files/many-rules.conf \ data/valid-config-files/system.d/test.conf \ data/valid-messages/array-of-array-of-uint32.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.7.6/test/data/valid-config-files/incoming-limit.conf new/dbus-1.7.8/test/data/valid-config-files/incoming-limit.conf --- old/dbus-1.7.6/test/data/valid-config-files/incoming-limit.conf 2013-10-09 13:09:28.000000000 +0200 +++ new/dbus-1.7.8/test/data/valid-config-files/incoming-limit.conf 1970-01-01 01:00:00.000000000 +0100 @@ -1,18 +0,0 @@ -<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN" - "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> -<busconfig> - <!-- Our well-known bus type, don't change this --> - <type>session</type> - <listen>unix:tmpdir=/tmp</listen> - - <policy context="default"> - <!-- Allow everything to be sent --> - <allow send_destination="*" eavesdrop="true"/> - <!-- Allow everything to be received --> - <allow eavesdrop="true"/> - <!-- Allow anyone to own anything --> - <allow own="*"/> - </policy> - - <limit name="max_incoming_bytes">1</limit> -</busconfig> 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.7.6/test/data/valid-config-files/incoming-limit.conf.in new/dbus-1.7.8/test/data/valid-config-files/incoming-limit.conf.in --- old/dbus-1.7.6/test/data/valid-config-files/incoming-limit.conf.in 1970-01-01 01:00:00.000000000 +0100 +++ new/dbus-1.7.8/test/data/valid-config-files/incoming-limit.conf.in 2013-10-10 17:55:13.000000000 +0200 @@ -0,0 +1,18 @@ +<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> +<busconfig> + <!-- Our well-known bus type, don't change this --> + <type>session</type> + <listen>@TEST_LISTEN@</listen> + + <policy context="default"> + <!-- Allow everything to be sent --> + <allow send_destination="*" eavesdrop="true"/> + <!-- Allow everything to be received --> + <allow eavesdrop="true"/> + <!-- Allow anyone to own anything --> + <allow own="*"/> + </policy> + + <limit name="max_incoming_bytes">1</limit> +</busconfig> 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.7.6/test/spawn-test.c new/dbus-1.7.8/test/spawn-test.c --- old/dbus-1.7.6/test/spawn-test.c 2013-10-08 19:40:40.000000000 +0200 +++ new/dbus-1.7.8/test/spawn-test.c 2013-11-01 13:39:42.000000000 +0100 @@ -30,7 +30,7 @@ argv_copy [i] = argv[i + 1]; argv_copy[argc - 1] = NULL; - if (!_dbus_spawn_async_with_babysitter (NULL, argv_copy, NULL, setup_func, NULL, &error)) + if (!_dbus_spawn_async_with_babysitter (NULL, argv_copy[0], argv_copy, NULL, setup_func, NULL, &error)) { fprintf (stderr, "Could not launch application: \"%s\"\n", 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.7.6/test-driver new/dbus-1.7.8/test-driver --- old/dbus-1.7.6/test-driver 2013-10-09 13:05:16.000000000 +0200 +++ new/dbus-1.7.8/test-driver 1970-01-01 01:00:00.000000000 +0100 @@ -1,127 +0,0 @@ -#! /bin/sh -# test-driver - basic testsuite driver script. - -scriptversion=2012-06-27.10; # UTC - -# Copyright (C) 2011-2013 Free Software Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to <[email protected]> or send patches to -# <[email protected]>. - -# Make unconditional expansion of undefined variables an error. This -# helps a lot in preventing typo-related bugs. -set -u - -usage_error () -{ - echo "$0: $*" >&2 - print_usage >&2 - exit 2 -} - -print_usage () -{ - cat <<END -Usage: - test-driver --test-name=NAME --log-file=PATH --trs-file=PATH - [--expect-failure={yes|no}] [--color-tests={yes|no}] - [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT -The '--test-name', '--log-file' and '--trs-file' options are mandatory. -END -} - -# TODO: better error handling in option parsing (in particular, ensure -# TODO: $log_file, $trs_file and $test_name are defined). -test_name= # Used for reporting. -log_file= # Where to save the output of the test script. -trs_file= # Where to save the metadata of the test run. -expect_failure=no -color_tests=no -enable_hard_errors=yes -while test $# -gt 0; do - case $1 in - --help) print_usage; exit $?;; - --version) echo "test-driver $scriptversion"; exit $?;; - --test-name) test_name=$2; shift;; - --log-file) log_file=$2; shift;; - --trs-file) trs_file=$2; shift;; - --color-tests) color_tests=$2; shift;; - --expect-failure) expect_failure=$2; shift;; - --enable-hard-errors) enable_hard_errors=$2; shift;; - --) shift; break;; - -*) usage_error "invalid option: '$1'";; - esac - shift -done - -if test $color_tests = yes; then - # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'. - red='[0;31m' # Red. - grn='[0;32m' # Green. - lgn='[1;32m' # Light green. - blu='[1;34m' # Blue. - mgn='[0;35m' # Magenta. - std='[m' # No color. -else - red= grn= lgn= blu= mgn= std= -fi - -do_exit='rm -f $log_file $trs_file; (exit $st); exit $st' -trap "st=129; $do_exit" 1 -trap "st=130; $do_exit" 2 -trap "st=141; $do_exit" 13 -trap "st=143; $do_exit" 15 - -# Test script is run here. -"$@" >$log_file 2>&1 -estatus=$? -if test $enable_hard_errors = no && test $estatus -eq 99; then - estatus=1 -fi - -case $estatus:$expect_failure in - 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; - 0:*) col=$grn res=PASS recheck=no gcopy=no;; - 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; - 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; - *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; - *:*) col=$red res=FAIL recheck=yes gcopy=yes;; -esac - -# Report outcome to console. -echo "${col}${res}${std}: $test_name" - -# Register the test result, and other relevant metadata. -echo ":test-result: $res" > $trs_file -echo ":global-test-result: $res" >> $trs_file -echo ":recheck: $recheck" >> $trs_file -echo ":copy-in-global-log: $gcopy" >> $trs_file - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
