system.conf 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <!-- This configuration file controls the systemwide message bus.
  2. Add a system-local.conf and edit that rather than changing this
  3. file directly. -->
  4. <!-- Note that there are any number of ways you can hose yourself
  5. security-wise by screwing up this file; in particular, you
  6. probably don't want to listen on any more addresses, add any more
  7. auth mechanisms, run as a different user, etc. -->
  8. <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
  9. "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
  10. <busconfig>
  11. <!-- Our well-known bus type, do not change this -->
  12. <type>system</type>
  13. <!-- Run as special user -->
  14. <user>dbus</user>
  15. <!-- Fork into daemon mode -->
  16. <fork/>
  17. <!-- We use system service launching using a helper -->
  18. <standard_system_servicedirs/>
  19. <!-- This is a setuid helper that is used to launch system services -->
  20. <servicehelper>/usr/libexec/dbus-daemon-launch-helper</servicehelper>
  21. <!-- Write a pid file -->
  22. <pidfile>/run/messagebus.pid</pidfile>
  23. <!-- Enable logging to syslog -->
  24. <syslog/>
  25. <!-- Only allow socket-credentials-based authentication -->
  26. <auth>EXTERNAL</auth>
  27. <!-- Only listen on a local socket. (abstract=/path/to/socket
  28. means use abstract namespace, don't really create filesystem
  29. file; only Linux supports this. Use path=/whatever on other
  30. systems.) -->
  31. <listen>unix:path=/run/dbus/system_bus_socket</listen>
  32. <policy context="default">
  33. <!-- All users can connect to system bus -->
  34. <allow user="*"/>
  35. <!-- Holes must be punched in service configuration files for
  36. name ownership and sending method calls -->
  37. <deny own="*"/>
  38. <deny send_type="method_call"/>
  39. <!-- Signals and reply messages (method returns, errors) are allowed
  40. by default -->
  41. <allow send_type="signal"/>
  42. <allow send_requested_reply="true" send_type="method_return"/>
  43. <allow send_requested_reply="true" send_type="error"/>
  44. <!-- All messages may be received by default -->
  45. <allow receive_type="method_call"/>
  46. <allow receive_type="method_return"/>
  47. <allow receive_type="error"/>
  48. <allow receive_type="signal"/>
  49. <!-- Allow anyone to talk to the message bus -->
  50. <allow send_destination="org.freedesktop.DBus"
  51. send_interface="org.freedesktop.DBus" />
  52. <allow send_destination="org.freedesktop.DBus"
  53. send_interface="org.freedesktop.DBus.Introspectable"/>
  54. <allow send_destination="org.freedesktop.DBus"
  55. send_interface="org.freedesktop.DBus.Properties"/>
  56. <allow send_destination="org.freedesktop.DBus"
  57. send_interface="org.freedesktop.DBus.Containers1"/>
  58. <!-- But disallow some specific bus services -->
  59. <deny send_destination="org.freedesktop.DBus"
  60. send_interface="org.freedesktop.DBus"
  61. send_member="UpdateActivationEnvironment"/>
  62. <deny send_destination="org.freedesktop.DBus"
  63. send_interface="org.freedesktop.DBus.Debug.Stats"/>
  64. <deny send_destination="org.freedesktop.DBus"
  65. send_interface="org.freedesktop.systemd1.Activator"/>
  66. </policy>
  67. <!-- Only systemd, which runs as root, may report activation failures. -->
  68. <policy user="root">
  69. <allow send_destination="org.freedesktop.DBus"
  70. send_interface="org.freedesktop.systemd1.Activator"/>
  71. </policy>
  72. <!-- root may monitor the system bus. -->
  73. <policy user="root">
  74. <allow send_destination="org.freedesktop.DBus"
  75. send_interface="org.freedesktop.DBus.Monitoring"/>
  76. </policy>
  77. <!-- If the Stats interface was enabled at compile-time, root may use it.
  78. Copy this into system.local.conf or system.d/*.conf if you want to
  79. enable other privileged users to view statistics and debug info -->
  80. <policy user="root">
  81. <allow send_destination="org.freedesktop.DBus"
  82. send_interface="org.freedesktop.DBus.Debug.Stats"/>
  83. </policy>
  84. <!-- Include legacy configuration location -->
  85. <include ignore_missing="yes">/etc/dbus-1/system.conf</include>
  86. <!-- The defaults for these limits are hard-coded in dbus-daemon.
  87. Some clarifications:
  88. Times are in milliseconds (ms); 1000ms = 1 second
  89. 133169152 bytes = 127 MiB
  90. 33554432 bytes = 32 MiB
  91. 150000ms = 2.5 minutes -->
  92. <!-- <limit name="max_incoming_bytes">133169152</limit> -->
  93. <!-- <limit name="max_incoming_unix_fds">64</limit> -->
  94. <!-- <limit name="max_outgoing_bytes">133169152</limit> -->
  95. <!-- <limit name="max_outgoing_unix_fds">64</limit> -->
  96. <!-- <limit name="max_message_size">33554432</limit> -->
  97. <!-- <limit name="max_message_unix_fds">16</limit> -->
  98. <!-- <limit name="service_start_timeout">25000</limit> -->
  99. <!-- <limit name="auth_timeout">5000</limit> -->
  100. <!-- <limit name="pending_fd_timeout">150000</limit> -->
  101. <!-- <limit name="max_completed_connections">2048</limit> -->
  102. <!-- <limit name="max_incomplete_connections">64</limit> -->
  103. <!-- <limit name="max_connections_per_user">256</limit> -->
  104. <!-- <limit name="max_pending_service_starts">512</limit> -->
  105. <!-- <limit name="max_names_per_connection">512</limit> -->
  106. <!-- <limit name="max_match_rules_per_connection">512</limit> -->
  107. <!-- <limit name="max_replies_per_connection">128</limit> -->
  108. <!-- Config files are placed here that among other things, punch
  109. holes in the above policy for specific services. -->
  110. <includedir>system.d</includedir>
  111. <includedir>/etc/dbus-1/system.d</includedir>
  112. <!-- This is included last so local configuration can override what's
  113. in this standard file -->
  114. <include ignore_missing="yes">/etc/dbus-1/system-local.conf</include>
  115. <include if_selinux_enabled="yes" selinux_root_relative="yes">contexts/dbus_contexts</include>
  116. </busconfig>