<!-- This configuration file controls the testing message bus.
     It is based on a session bus config. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
  <!-- Our well-known bus type, don't change this -->
  <type>session</type>

  <!-- Authentication:
       This was useful during refactoring, but meanwhile RSpec mocking has
       replaced it. -->
  <!-- Explicitly list all known authentication mechanisms,
       their order is not important.
       By default the daemon allows all but this lets me disable some. -->
  <auth>EXTERNAL</auth>
  <auth>DBUS_COOKIE_SHA1</auth>
  <auth>ANONYMOUS</auth>
  <!-- Insecure, other users could call us and exploit debug APIs/bugs -->
  <!--
  <allow_anonymous/>
  -->

  <!-- Give clients a variety of addresses to connect to -->
  <listen>unix:tmpdir=/tmp</listen>
  <listen>unix:dir=/tmp</listen>
  <!-- runtime will happily steal the actual session bus! -->
  <!--
  <listen>unix:runtime=yes</listen>
  -->
  <!-- openSUSE Build Service does not set up IPv6 at build time -->
  <!--
  <listen>tcp:host=%3a%3a1,family=ipv6</listen>
  -->
  <listen>tcp:host=127.0.0.1</listen>

  <standard_session_servicedirs />

  <policy context="default">
    <!-- Allow everything to be sent -->
    <allow send_destination="*" eavesdrop="true"/>
    <!-- Allow everything to be received -->
    <allow eavesdrop="true"/>
    <!-- Allow anyone to own anything -->
    <allow own="*"/>

    <!-- To test how request_name handles bus errors -->
    <deny own="org.rubygems.ruby_dbus.NobodyCanOwnThisName"/>
  </policy>

  <!-- Do not increase the limits.
       Instead, lower some so that we can test resource leaks. -->
  <limit name="max_match_rules_per_connection">50</limit><!-- was 512 -->
  <limit name="reply_timeout">5000</limit><!-- 5 seconds -->

  <!--
dbus-daemon[1700]: [session uid=1001 pid=1700] Unable to set up new connection: Failed to get AppArmor confinement information of socket peer: Protocol not available
  -->
  <apparmor mode="disabled"/>
</busconfig>
