Eavesdrop and configuration files...

John (J5) Palmieri johnp at redhat.com
Wed Apr 2 07:42:17 PDT 2008


If you are just doing this for testing I would just copy the rules from
session.conf, just make sure you switch it back after testing and as a
rule back up data (or better yet do testing in a chroot or virtual
machine).  If you are using an older version of D-Bus there were bugs
with eavesdropping which prevented all messages from being seen.  To my
knowledge this has been fixed.

On Tue, 2008-04-01 at 13:37 -0400, David Belser wrote:
> I'm trying to do some timing debugging and I need to eavesdrop all
> method calls and returns on the system bus. I haven't been able to
> come up with a config policy that will work. I'm running dbus-monitor
> as root and have tried the following config:
> 
>   <policy context="default">
>     <allow send_destination="*" eavesdrop="true"/>
>     <allow eavesdrop="true" send_requested_reply="false"/>         --
> also tried this, but didn't expect it to work
>     <allow eavesdrop="true" receive_requested_reply="false"/>      --
> added this after scanning source code
>     <allow eavesdrop="true"/>
>     <allow user="*"/>
>     <allow own="*"/>
>   </policy>
> 
> What policy configuration do I need to make this work?
> 
> At this point I've commented out the following in policy.c :
> 
> /* for allow, requested_reply=true means the rule applies
>  * only when reply was requested. requested_reply=false means
>  * always allow.
> */
> if (!requested_reply && rule->allow && rule->d.send.requested_reply &&
> !rule->d.send.eavesdrop)
> {
>   _dbus_verbose ("  (policy) skipping allow rule since it only applies
> to requested replies and does not allow eavesdropping\n");
>   continue;
> }
> 
> At which point I can monitor method reply messages. I'd really like to
> be able to do this without modifying the code. I assume that there
> must be a policy that will allow me to do this.
> 
> - Dave
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
-- 
John (J5) Palmieri <johnp at redhat.com>



More information about the dbus mailing list