]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
bus/driver: Containers can't use the Verbose and Stats interfaces
authorSimon McVittie <smcv@collabora.com>
Thu, 8 Jun 2017 17:17:31 +0000 (18:17 +0100)
committerSimon McVittie <smcv@collabora.com>
Tue, 12 Dec 2017 16:22:34 +0000 (16:22 +0000)
These are debugging interfaces, which are essentially read-only.
By default, Verbose is not available on the system bus at all and
Stats is only available to uid 0, but both are available on the
session bus, and they can be allowed for other uids by configuring
the system bus.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101354

bus/driver.c

index e943ea0e786705480ec93c032bb5a9f7e10cf0a6..cef1e862404a2ef980d5c855c3850e4a0fa90ba9 100644 (file)
@@ -2577,9 +2577,9 @@ static const MessageHandler monitoring_message_handlers[] = {
 #ifdef DBUS_ENABLE_VERBOSE_MODE
 static const MessageHandler verbose_message_handlers[] = {
   { "EnableVerbose", "", "", bus_driver_handle_enable_verbose,
-    METHOD_FLAG_NONE },
+    METHOD_FLAG_NO_CONTAINERS },
   { "DisableVerbose", "", "", bus_driver_handle_disable_verbose,
-    METHOD_FLAG_NONE },
+    METHOD_FLAG_NO_CONTAINERS },
   { NULL, NULL, NULL, NULL }
 };
 #endif
@@ -2587,11 +2587,11 @@ static const MessageHandler verbose_message_handlers[] = {
 #ifdef DBUS_ENABLE_STATS
 static const MessageHandler stats_message_handlers[] = {
   { "GetStats", "", "a{sv}", bus_stats_handle_get_stats,
-    METHOD_FLAG_NONE },
+    METHOD_FLAG_NO_CONTAINERS },
   { "GetConnectionStats", "s", "a{sv}", bus_stats_handle_get_connection_stats,
-    METHOD_FLAG_NONE },
+    METHOD_FLAG_NO_CONTAINERS },
   { "GetAllMatchRules", "", "a{sas}", bus_stats_handle_get_all_match_rules,
-    METHOD_FLAG_NONE },
+    METHOD_FLAG_NO_CONTAINERS },
   { NULL, NULL, NULL, NULL }
 };
 #endif