Eavesdrop and configuration files...

David Belser thebelserturner at gmail.com
Tue Apr 1 10:37:05 PDT 2008


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


More information about the dbus mailing list