summaryrefslogtreecommitdiff
path: root/bus/signals.c
Commit message (Collapse)AuthorAgeFilesLines
* Mediation of processes eavesdroppingTyler Hicks2015-02-181-0/+9
| | | | | | | | | | | | | | | | | | | | | | | When an AppArmor confined process wants to eavesdrop on a bus, a check is performed to see if the action should be allowed. The check is based on the connection's label and the bus type. This patch adds a new hook, which was not previously included in the SELinux mediation, to mediate eavesdropping from bus_driver_handle_add_match(). A new function is added to bus/signals.c to see if a match rule is an eavesdropping rule since the rule flags field is private to signals.c. An example AppArmor rule that would allow a process to eavesdrop on the session bus would be: dbus eavesdrop bus=session, Bug: https://bugs.freedesktop.org/show_bug.cgi?id=75113 Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Fix assertion in regression test to be equality test, not assignmentSimon McVittie2015-01-061-1/+1
| | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=88088
* Use ISO C strchr() instead of BSD index()Simon McVittie2014-09-251-2/+4
| | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=24307
* match_rule_to_string: add testAlban Crequy2014-09-251-1/+23
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=24307 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* match_rule_to_string: fix escapingAlban Crequy2014-09-251-14/+51
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=24307 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* match_rule_to_string: returns NULL if no memory instead of loopingAlban Crequy2014-09-251-14/+7
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=24307 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Implement GetAllMatchRules on the Stats interfaceAlban Crequy2014-09-251-2/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usage: $ dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus \ org.freedesktop.DBus.Debug.Stats.GetAllMatchRules method return sender=org.freedesktop.DBus -> dest=:1.13 reply_serial=2 array [ dict entry( string ":1.4" array [ ] ) dict entry( string ":1.9" array [ string "type='signal',interface='org.freedesktop.DBus',member='NameOwnerChanged'" ] ) dict entry( string ":1.11" array [ string "eavesdrop='true'" ] ) ] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=24307 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Merge branch 'dbus-1.6'Simon McVittie2013-10-231-1/+29
|\
| * path_namespace='/' should match everythingSimon McVittie2013-10-231-1/+29
| | | | | | | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=70799 Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Reviewed-by: Ryan Lortie <desrt@desrt.ca>
* | Cleanup: polish verbose mode checkingChengwei Yang2013-08-231-2/+0
| | | | | | | | Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* | tests to embedded tests: replaced in dbus-daemonChengwei Yang2013-06-281-3/+3
|/ | | | | | Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66291
* Do not allow eavedropping unless rule owner explicitely declare itCosimo Alfarano2011-07-111-0/+93
| | | | | | | | | | | | | Adds "eavesdrop=true" as a match rule, meaning that the owner intend to eavedrop. Otherwise the owner will receive only broadcasted messages and the ones meant to be delivered to it. [plus a typo fix in an error message -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37890 Bug-NB: NB#269748 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* match_rule_to_string: don't reinvent dbus_message_type_to_stringSimon McVittie2011-06-241-30/+3
| | | | | | | | We don't allow match rules with unknown message types, so losing the "type='%d'" case isn't a great loss. Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34040
* Check parsing (or otherwise) of path_namespace in match rulesSimon McVittie2011-04-071-0/+18
|
* Remove support for trailing "." on arg0namespaceSimon McVittie2011-04-071-52/+11
|
* Rename path_prefix to path_namespace and disallow trailing '/'Simon McVittie2011-04-071-93/+45
| | | | | | | | | Also disallow having both path and path_namespace in the same match rule (it wouldn't make sense, path is more specific than path_namespace). As per IRC discussion with davidz and wjt. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34870
* path_prefix: anchor matches at path-component boundaries, and give examplesSimon McVittie2011-04-071-1/+13
| | | | | It seems wrong that path_prefix="/foo" matches /foobar, and it isn't difficult or expensive to check.
* Add path_prefix match ruleDavid Zeuthen2011-04-071-0/+168
| | | | | | | | | | Add a new path_prefix match rule that can be used for efficient implementations of the org.freedesktop.DBus.ObjectManager interface (see bug 34869). https://bugs.freedesktop.org/show_bug.cgi?id=34870 Signed-off-by: David Zeuthen <davidz@redhat.com>
* Merge remote-tracking branch 'wjt/arg0namespace' into arg0namespace-24317Simon McVittie2011-04-071-22/+338
|\
| * Validate arg0namespace matches' values.Will Thompson2010-11-231-0/+68
| | | | | | | | | | I could be convinced that this is overkill, but it seems sensible to forbid obviously-broken arg0namespace matches.
| * Supporting matching argument 0 as a namespaceWill Thompson2010-11-231-17/+152
| | | | | | | | | | | | | | | | | | | | | | | | Rather like "arg0path='/foo/'" matching all object paths starting with "/foo/", this adds support for matching a prefix of a string argument with "arg0namespace='org.freedesktop.Telepathy.Client.'" (for example). This is mostly intended for use with NameOwnerChanged and PropertiesChanged; thus, only matching the 0th argument is permitted. (This also means it could work with the multicast-plus-socket-filters model being considered for DBus-in-the-kernel without having to hash every period-separated prefix of every string argument.)
| * Support matching path arguments with argXpathWill Thompson2010-11-211-10/+24
| | | | | | | | | | The existing implementation only matched arguments of type 's', not of type 'o'!
| * Add test cases for argXpath matchingWill Thompson2010-11-211-3/+102
| |
* | Implement message type in match_rule_to_stringAlban Crequy2011-01-311-3/+30
| | | | | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=24307 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* | bus_matchmaker_new: free matchmaker itself, on OOMChristian Dywan2011-01-171-0/+1
|/ | | | | | | Origin: vendor, Maemo Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33128 Bug-NB: NB#180486 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Consistently include <config.h> in all C source files and never in header files.Marcus Brinkmann2010-03-191-0/+2
|
* Rename DBusConnection *disconnected param to connectionWill Thompson2010-01-051-8/+8
|
* Group match rules by their interface.Will Thompson2010-01-051-53/+239
| | | | | | | | | In my informal studies of "normal" sets of match rules, only checking match rules with the appropriate interface for the message reduces the number that need to be checked by almost 100x on average (ranging from halving for messages from the bus daemon, to a >200x reduction in many cases). This reduces the overhead added to dispatching each message by having lots of irrelevant match rules.
* Extract rule_list_remove_by_connectionWill Thompson2010-01-051-37/+45
|
* Extract freeing a DBusList<BusMatchRule>Will Thompson2010-01-051-12/+14
|
* Don't bother re-matching features we've checked.Will Thompson2010-01-051-11/+18
| | | | | | This is currently not a big deal, but will make more of a difference once the set of match rules is partitioned by more features than just the message type.
* Index match rules by message typeWill Thompson2010-01-051-78/+139
| | | | | This avoids scanning all the signal matches while dispatching method calls and returns, which are rarely matched against.
* Bug 21161 - Update the FSF addressTobias Mueller2009-07-101-1/+1
| | | | | | No comment. Signed-off-by: Colin Walters <walters@verbum.org>
* Add argument path matching support. Bug #11066.Ryan Lortie2007-09-201-22/+97
| | | | | | | | | | | | | | | | | | 2007-09-20 Ryan Lortie <desrt@desrt.ca> * dbus/signals.c (struct DBusMatchRule, bus_match_rule_new, bus_match_rule_set_arg, bus_match_rule_parse_arg_match, match_rule_matches): Add support for parsing and matching on arg0path='/some/path' type rules. * dbus/signals.h (bus_match_rule_set_arg): change to take const DBusString instead of const char * for the string to match against. * dbus/dbus-bus.c: add a quick note to dbus_bus_add_match documentation about the path matching. * doc/dbus-specification.xml: add a more detailed description of the changes here.
* 2007-07-13 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-07-141-1/+1
| | | | * Add indent-tabs-mode: nil to all file headers.
* * bus/signal.c: Fix match_rule_equal errataJohn (J5) Palmieri2006-12-121-0/+3
| | | | | (CVE-2006-6107 - Patch from Kimmo Hämäläinen <kimmo.hamalainen@nokia.com>)
* * configure.in: Add test/name-test/Makefile to the generatedJohn (J5) Palmieri2005-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makefile list * dbus/dbus-shared.h (#define DBUS_NAME_FLAG_ALLOW_REPLACEMENT): New flag which replaces DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT (#define DBUS_NAME_FLAG_DO_NOT_QUEUE): New flag for specifying not to queue an ower if it can't be the primary owner * bus/bus.h: Add new internal BusOwner struct * bus/driver.c (bus_driver_handle_hello): Send flags (0 for default) to bus_registry_ensure and don't set the prohibit_replacement flag since they are now set per BusOwner and not per name. (bus_driver_handle_list_queued_owners): bus method (ListQueuedOwners) that returns the list of connections in a name's connection queue * bus/services.c (struct BusService): remove prohibit_replacement field (struct BusOwner): new struct for keeping track of queued connections and their associated flags for the queue (struct BusRegistry): add a BusOwner memory pool (bus_registry_new): initialize the BusOwner memory pool (bus_registry_unref): free the BusOwner memory pool (_bus_service_find_owner_link): new internal method for searching the queue for a specific connection (bus_owner_set_flags): new method for adding setting the flags on a bus owner (bus_owner_new): new method that creates a BusOwner object from the pool and sets its flags (bus_owner_ref, bus_owner_unref): ref counting for BusOwner objects (bus_registry_ensure): Add the flags parameter (bus_registry_acquire_service): Switch from using raw connections to using the BusOwner struct Add new state machine for dealing with the new set of flags (bus_registry_set_service_context_table, struct OwnershipCancelData, cancel_ownership, free_ownership_cancel_data, add_cancel_ownership_to_transaction, struct OwnershipRestoreData, restore_ownership, free_ownership_restore_data, add_restore_ownership_to_transaction): Switch to using BusOwner instead of raw connections (bus_service_add_owner): Add flags parameter Switch to using BusOwner instead of raw connections Add state machine for dealing with the new set of flags (bus_service_swap_owner): Swaps the first and second owners in the queue. Used to make sure proper signals are sent when a service looses or gains primary ownership. We never insert an owner at the top of the queue. Instead we insert it in the second position and then swap. (bus_service_remove_owner): Remove the owner from the queue sending out the NameLost and NameOwnerChanged signals if the we were the primary owner (bus_service_get_primary_owners_connection): New method that extracts the connection from the primary owner (bus_service_get_primary_owner): Returns the BusOwner instead of the connection (bus_service_get_allow_replacement): Changed from the old bus_service_get_prohibit_replacement method. Checks the flags of the primary owner and returns if it can be replaced or not (bus_service_set_prohibit_replacement): removed (bus_service_has_owner): returns TRUE if and owner with the specified connection exists in the queue * dbus/dbus-bus.c (dbus_bus_connection_get_unique_name): New helper method that only compiles if tests are enabled. Allows us to get the unique name of a connection so we can check it against the queue when doing regression tests * bus/activation.c (bus_activation_send_pending_auto_activate), bus/dispatch.c (bus_dispatch), bus/driver.c (bus_driver_handle_get_service_owner, bus_driver_handle_get_connection_unix_user, bus_driver_handle_get_connection_unix_process_id, bus_driver_handle_get_connection_selinux_security_context), bus/signals.c (connection_is_primary_owner): use bus_service_get_primary_owners_connection instead of bus_service_get_primary_owner * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket, _dbus_listen_unix_socket): Calculate the length of the socket path and use that instead of using a fixed length which was causing socket names to contain many trailing Nul bytes. * dbus/dbus-glib-lowlevel.h, glib/dbus-gobject.c (dbus_g_method_get_sender): New method for extracting the sender from a DBusGMethodInvocation (dbus_g_method_return_get_reply): changed name to dbus_g_method_get_reply (dbus_g_method_return_send_reply): changed name to dbus_g_method_send reply * doc/dbus-specification.xml: New docs that describe how the new queueing system works and talks about the changes to the how we specify socket names * glib/examples/example-service.c, glib/examples/example-signal-emitter.c, glib/examples/statemachine/statemachine-server.c: Changed the RequestName flags to the new system * test/name-test/ (test-names.c, run-test.sh, Makefile.am): New regression test suite for testing various states of the new queueing system
* 2005-07-29 Havoc Pennington <hp@redhat.com>Havoc Pennington2005-07-291-5/+533
| | | | | | | | | | | | * bus/signals.c (bus_signals_test): add match_rule_equal() tests (match_rule_matches): remove unused arg (test_matching): add tests for match_rule_matches() * bus/signals.c (bus_match_rule_parse_arg_match): add ability to do arg0='foo' arg5='bar' in the match rules (match_rule_matches): don't match if the arg0='foo' doesn't match. * dbus/dbus-protocol.h (DBUS_MAXIMUM_MATCH_RULE_ARG_NUMBER): add this
* 2005-02-17 Colin Walters <walters@verbum.org>Colin Walters2005-02-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_SERVICE_DBUS. (DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS. (DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL. (DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS. (DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to DBUS_INTERFACE_INTROSPECTABLE. (DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to DBUS_INTERFACE_PROPERTIES. (DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to DBUS_INTERFACE_PEER. (DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL): DBUS_INTERFACE_LOCAL. All other users of those constants have been changed. * bus/driver.c (bus_driver_handle_introspect): Use constants. * glib/dbus-gobject.c (handle_introspect): Use constants. * doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
* 2005-01-18 Havoc Pennington <hp@redhat.com>Havoc Pennington2005-01-181-4/+4
| | | | | | | | | | | | * Throughout, grand renaming to strip out the use of "service", just say "name" instead (or "bus name" when ambiguous). Did not change the internal code of the message bus itself, only the programmer-facing API and messages. * doc/dbus-specification.xml: further update the message bus section * bus/config-parser.c (all_are_equiv): fix bug using freed string in error case
* 2005-01-15 Havoc Pennington <hp@redhat.com>Havoc Pennington2005-01-151-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Land the new message args API and type system. This patch is huge, but the public API change is not really large. The set of D-BUS types has changed somewhat, and the arg "getters" are more geared toward language bindings; they don't make a copy, etc. There are also some known issues. See these emails for details on this huge patch: http://lists.freedesktop.org/archives/dbus/2004-December/001836.html http://lists.freedesktop.org/archives/dbus/2005-January/001922.html * dbus/dbus-marshal-*: all the new stuff * dbus/dbus-message.c: basically rewritten * dbus/dbus-memory.c (check_guards): with "guards" enabled, init freed blocks to be all non-nul bytes so using freed memory is less likely to work right * dbus/dbus-internals.c (_dbus_test_oom_handling): add DBUS_FAIL_MALLOC=N environment variable, so you can do DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or DBUS_FAIL_MALLOC=10 to make it really, really, really slow and thorough. * qt/message.cpp: port to the new message args API (operator<<): use str.utf8() rather than str.unicode() (pretty sure this is right from the Qt docs?) * glib/dbus-gvalue.c: port to the new message args API * bus/dispatch.c, bus/driver.c: port to the new message args API * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the "locked" flag to TRUE and align_offset to 0; I guess we never looked at these anyhow, but seems cleaner. * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING): move allocation padding macro to this header; use it to implement (_DBUS_STRING_STATIC): ability to declare a static string. * dbus/dbus-message.c (_dbus_message_has_type_interface_member): change to return TRUE if the interface is not set. * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff to dbus-marshal-validate.[hc] * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from dbus-internals.c * dbus/Makefile.am: cut over from dbus-marshal.[hc] to dbus-marshal-*.[hc] * dbus/dbus-object-tree.c (_dbus_decompose_path): move this function here from dbus-marshal.c
* * bus/signals.c (bus_match_rule_parse): validate the components ofOlivier Andrieu2004-09-271-48/+59
| | | | | | match rules (bug #1439). * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
* 2004-08-09 Havoc Pennington <hp@redhat.com>Havoc Pennington2004-08-101-1/+1
| | | | | * COPYING: switch to Academic Free License version 2.1 instead of 2.0, to resolve complaints about patent termination clause.
* 2003-12-02 Richard Hult <richard@imendio.com>Richard Hult2003-12-021-1/+1
| | | | | * Update AFL version to 2.0 throughout the source files to reflect the update that was done a while ago.
* 2003-11-26 Mikael Hallendal <micke@imendio.com>Mikael Hallendal2003-11-271-2/+6
| | | | | | * bus/*.[ch]: * dbus/*.[ch]: * glib/*.[ch]: Made ref functions return the pointer
* 2003-10-16 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-10-161-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bus/connection.c (bus_pending_reply_expired): either cancel or execute, not both (bus_connections_check_reply): use unlink, not remove_link, as we don't want to free the link; fixes double free mess * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case where no reply was received * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock): fix a refcount leak * bus/signals.c (match_rule_matches): add special cases for the bus driver, so you can match on sender/destination for it. * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if DBUS_PRINT_BACKTRACE is set * dbus/dbus-internals.c: add pid to assertion failure messages * dbus/dbus-connection.c: add message type code to the debug spew * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want sender=foo not service=foo * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use DBUS_ACTIVATION_ADDRESS instead * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS, DBUS_SYSTEM_BUS_ADDRESS if appropriate * bus/bus.c (bus_context_new): handle OOM copying bus type into context struct * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function (dbus_message_iter_get_object_path_array): new function (half finished, disabled for the moment) * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle DBUS_MESSAGE_TYPE_ERROR * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to avoid redirecting stderr to /dev/null (babysit): close stdin if not doing the "exit_with_session" thing * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not stdout/stdin, so things don't get confused * bus/system.conf.in: fix to allow replies, I modified .conf instead of .conf.in again.
* 2003-10-09 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-10-101-0/+9
| | | | | | | | | | * configure.in: define DBUS_HAVE_GCC33_GCOV if we have gcc 3.3. Not that we do anything about it yet. * bus/signals.c (bus_match_rule_parse): impose max length on the match rule text * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
* 2003-10-09 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-10-101-12/+611
| | | | | | | | | | | | | | | | | | | Make matching rules theoretically work (add parser). * bus/bus.c (bus_context_check_security_policy): fix up to handle the case where destination is explicitly specified as bus driver and someone else is eavesdropping. * bus/policy.c (bus_client_policy_check_can_receive): fix up definition of eavesdropping and assertion * tools/dbus-send.c (main): use dbus_message_type_from_string * bus/signals.c (bus_match_rule_parse): implement * dbus/dbus-message.c (dbus_message_type_from_string): new * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
* 2003-09-23 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-09-231-1/+5
| | | | | | | | * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement (dbus_gproxy_disconnect_signal): implement (dbus_gproxy_manager_remove_signal_match): implement (dbus_gproxy_manager_add_signal_match): implement (dbus_gproxy_oneway_call): implement
* 2003-09-21 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-09-211-0/+774
Get matching rules mostly working in the bus; only actually parsing the rule text remains. However, the client side of "signal connections" hasn't been started, this patch is only the bus side. * dbus/dispatch.c: fix for the matching rules changes * bus/driver.c (bus_driver_handle_remove_match) (bus_driver_handle_add_match): send an ack reply from these method calls * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of arguments, reported by Seth Nickell * bus/config-parser.c (append_rule_from_element): support eavesdrop=true|false attribute on policies so match rules can be prevented from snooping on the system bus. * bus/dbus-daemon-1.1.in: consistently use terminology "sender" and "destination" in attribute names; fix some docs bugs; add eavesdrop=true|false attribute * bus/driver.c (bus_driver_handle_add_match) (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch messages * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get rid of broadcast service concept, signals are just always broadcast * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c: mostly implement matching rules stuff (currently only exposed as signal connections)