]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Enable Stats interface by default; disallow non-root use on system bus
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 5 Sep 2014 14:15:14 +0000 (15:15 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 1 Oct 2014 15:37:20 +0000 (16:37 +0100)
[fix typo in interface name -alban]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=80759
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
bus/system.conf.in
configure.ac

index 92f4cc420ff302dbff2977ac5d8a791e557aef8c..c1541bffafe9747158889712782d5d9c31961299 100644 (file)
     <allow receive_type="signal"/>
 
     <!-- Allow anyone to talk to the message bus -->
-    <allow send_destination="org.freedesktop.DBus"/>
+    <allow send_destination="org.freedesktop.DBus"
+           send_interface="org.freedesktop.DBus" />
+    <allow send_destination="org.freedesktop.DBus"
+           send_interface="org.freedesktop.DBus.Introspectable"/>
     <!-- But disallow some specific bus services -->
     <deny send_destination="org.freedesktop.DBus"
           send_interface="org.freedesktop.DBus"
           send_member="UpdateActivationEnvironment"/>
+    <deny send_destination="org.freedesktop.DBus"
+          send_interface="org.freedesktop.DBus.Debug.Stats"/>
+  </policy>
+
+  <!-- If the Stats interface was enabled at compile-time, root may use it.
+       Copy this into system.local.conf or system.d/*.conf if you want to
+       enable other privileged users to view statistics and debug info -->
+  <policy user="root">
+    <allow send_destination="org.freedesktop.DBus"
+           send_interface="org.freedesktop.DBus.Debug.Stats"/>
   </policy>
 
   <!-- Config files are placed here that among other things, punch 
index 4443d057de17e0d0aebc290751d3a0d6d5027e42..142b59c2425c5e34e4e9fc390ea66e68377b0184 100644 (file)
@@ -1736,9 +1736,9 @@ AH_VERBATIM(_DARWIN_ENVIRON,
 ])
 
 AC_ARG_ENABLE([stats],
-  [AS_HELP_STRING([--enable-stats],
-    [enable bus daemon usage statistics])],
-  [], [enable_stats=no])
+  [AS_HELP_STRING([--disable-stats],
+    [disable bus daemon usage statistics])],
+  [], [enable_stats=yes])
 if test "x$enable_stats" = xyes; then
   AC_DEFINE([DBUS_ENABLE_STATS], [1],
     [Define to enable bus daemon usage statistics])