From 8b1b8beece5b41ecc18e8c74d0a886d9033eb745 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 29 Jun 2017 16:32:25 +0100 Subject: [PATCH] spec: Formally deprecate eavesdropping Reviewed-by: Philip Withnall [smcv: Wrap BecomeMonitor in as per Philip's review] Signed-off-by: Simon McVittie Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101567 --- doc/dbus-specification.xml | 64 ++++++++++++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 22 deletions(-) diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index 571f037..8ad5833 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -4361,6 +4361,14 @@ + 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 +4385,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 +4406,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 +4614,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.7.4