From 25287c67b2854e29c4336a9e6e846994d9eb06df Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 29 Jun 2017 16:32:25 +0100 Subject: [PATCH 2/3] spec: Formally deprecate eavesdropping Signed-off-by: Simon McVittie --- doc/dbus-specification.xml | 63 ++++++++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 22 deletions(-) diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index 571f037d..fdc04249 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -4361,6 +4361,13 @@ + Eavesdropping interacts poorly with buses with non-trivial + access control restrictions, and is deprecated. The BecomeMonitor + method (see ) provides + a preferable way to monitor buses. + + + Eavesdropping is mainly useful for debugging tools, such as the dbus-monitor tool in the reference implementation of D-Bus. Tools which eavesdrop on the message bus @@ -4377,13 +4384,6 @@ adding the same rule with the eavesdrop match omitted. - - - Eavesdropping interacts poorly with buses with non-trivial - access control restrictions. The - method provides - an alternative way to monitor buses. - @@ -4405,7 +4405,9 @@ Match rules can also be used for eavesdropping (see ), - if the security policy of the message bus allows it. + if the security policy of the message bus allows it, but this + usage is deprecated in favour of the BecomeMonitor method + (see ). Match rules are added using the AddMatch bus method @@ -4611,20 +4613,37 @@ eavesdrop 'true', 'false' - Since D-Bus 1.5.6, match rules do not - match messages which have a DESTINATION - field unless the match rule specifically - requests this - (see ) - by specifying eavesdrop='true' - in the match rule. eavesdrop='false' - restores the default behaviour. Messages are - delivered to their DESTINATION - regardless of match rules, so this match does not - affect normal delivery of unicast messages. - In older versions of D-Bus, this match was not allowed - in match rules, and all match rules behaved as if - eavesdrop='true' had been used. + + + Since D-Bus 1.5.6, match rules do not + match messages which have a DESTINATION + field unless the match rule specifically + requests this + (see ) + by specifying eavesdrop='true' + in the match rule. eavesdrop='false' + restores the default behaviour. Messages are + delivered to their DESTINATION + regardless of match rules, so this match does not + affect normal delivery of unicast messages. + In older versions of D-Bus, this match was not allowed + in match rules, and all match rules behaved as if + eavesdrop='true' had been used. + + + Use of eavesdrop='true' is + deprecated. Monitors should prefer to use the + BecomeMonitor method (see + ), + which was introduced in version 0.26 of the D-Bus + specification and version 1.9.10 of the reference + dbus-daemon. + + + Message bus implementations may restrict match rules + with eavesdrop='true' so that they + can only be added by privileged connections. + -- 2.13.2