diff options
-rw-r--r-- | NEWS | 10 | ||||
-rw-r--r-- | bus/signals.c | 30 | ||||
-rwxr-xr-x | configure | 26 | ||||
-rw-r--r-- | configure.ac | 4 |
4 files changed, 54 insertions, 16 deletions
@@ -1,3 +1,13 @@ +D-Bus 1.6.18 (2013-11-01) +== + +The “sunflower plains” release. + +Fixes: + +• path_namespace='/' in match rules incorrectly matched nothing; it + now matches everything. (fd.o #70799, Simon McVittie) + D-Bus 1.6.16 (2013-10-08) == diff --git a/bus/signals.c b/bus/signals.c index 28506d3f..a198c6e9 100644 --- a/bus/signals.c +++ b/bus/signals.c @@ -1836,8 +1836,11 @@ match_rule_matches (BusMatchRule *rule, * 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; } @@ -2719,6 +2722,7 @@ test_path_matching (void) 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 @@ -2733,6 +2737,7 @@ path_namespace_should_not_match_message_1[] = { static const char* path_namespace_should_match_message_2[] = { + "type='signal',path_namespace='/'", "type='signal',path_namespace='/foo/TheObjectManager'", NULL }; @@ -2744,6 +2749,7 @@ path_namespace_should_not_match_message_2[] = { static const char* path_namespace_should_match_message_3[] = { + "type='signal',path_namespace='/'", NULL }; @@ -2753,12 +2759,25 @@ path_namespace_should_not_match_message_3[] = { 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); @@ -2775,6 +2794,11 @@ test_matching_path_namespace (void) 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); @@ -2784,7 +2808,11 @@ test_matching_path_namespace (void) 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); @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for dbus 1.6.16. +# Generated by GNU Autoconf 2.69 for dbus 1.6.18. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=dbus>. # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dbus' PACKAGE_TARNAME='dbus' -PACKAGE_VERSION='1.6.16' -PACKAGE_STRING='dbus 1.6.16' +PACKAGE_VERSION='1.6.18' +PACKAGE_STRING='dbus 1.6.18' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=dbus' PACKAGE_URL='' @@ -1527,7 +1527,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures dbus 1.6.16 to adapt to many kinds of systems. +\`configure' configures dbus 1.6.18 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1601,7 +1601,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dbus 1.6.16:";; + short | recursive ) echo "Configuration of dbus 1.6.18:";; esac cat <<\_ACEOF @@ -1802,7 +1802,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -dbus configure 1.6.16 +dbus configure 1.6.18 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2521,7 +2521,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by dbus $as_me 1.6.16, which was +It was created by dbus $as_me 1.6.18, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3461,7 +3461,7 @@ fi # Define the identity of the package. PACKAGE='dbus' - VERSION='1.6.16' + VERSION='1.6.18' cat >>confdefs.h <<_ACEOF @@ -3760,7 +3760,7 @@ LT_CURRENT=10 ## increment any time the source changes; set to ## 0 if you increment CURRENT -LT_REVISION=5 +LT_REVISION=6 ## increment if any interfaces have been added; set to 0 ## if any interfaces have been changed or removed. removal has @@ -3773,8 +3773,8 @@ LT_AGE=7 DBUS_MAJOR_VERSION=1 DBUS_MINOR_VERSION=6 -DBUS_MICRO_VERSION=16 -DBUS_VERSION=1.6.16 +DBUS_MICRO_VERSION=18 +DBUS_VERSION=1.6.18 @@ -23355,7 +23355,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by dbus $as_me 1.6.16, which was +This file was extended by dbus $as_me 1.6.18, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23421,7 +23421,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -dbus config.status 1.6.16 +dbus config.status 1.6.18 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 9169fbb9..20b788d3 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.63]) m4_define([dbus_major_version], [1]) m4_define([dbus_minor_version], [6]) -m4_define([dbus_micro_version], [16]) +m4_define([dbus_micro_version], [18]) m4_define([dbus_version], [dbus_major_version.dbus_minor_version.dbus_micro_version]) AC_INIT([dbus],[dbus_version],[https://bugs.freedesktop.org/enter_bug.cgi?product=dbus],[dbus]) @@ -37,7 +37,7 @@ LT_CURRENT=10 ## increment any time the source changes; set to ## 0 if you increment CURRENT -LT_REVISION=5 +LT_REVISION=6 ## increment if any interfaces have been added; set to 0 ## if any interfaces have been changed or removed. removal has |