Skip to content
  • Will Thompson's avatar
    Use dbus-monitor --pcap to capture traffic · 31896f2d
    Will Thompson authored
    Modern versions of D-Bus have a BecomeMonitor method which allows a
    sufficiently-privileged user (ie root) to capture all messages on the
    system bus. Modern versions of dbus-monitor use this method, and support
    pcap output natively.
    
    This allows us to use pkexec to escalate just the dbus-monitor process,
    and so add a way to monitor the system bus from within the UI.  We can
    also use Flatpak's HostCommand method (via `flatpak-spawn --host`) to do
    the same from within the Flatpak sandbox. It's not much extra effort to
    support monitoring an arbitrary bus by address, so that's wired up too.
    
    Bustle itself still connects to the bus you're monitoring to dump all
    current names, so will still require full session and system bus access.
    If this fails, it's not considered fatal.
    
    We assume that dbus-monitor is present on the host, and recent enough to
    support --pcap. We'll see if this assumption is true in practice!
    31896f2d