From ad8f6210c5f37cc46b97f41d0e236bf70c103985 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 21 Jun 2018 17:17:31 +0100 Subject: [PATCH 43/44] fixup! containers test: Add a test for sending and receiving method calls Don't test EnableVerbose() or GetStats() if that functionality was not compiled in. For dbus-daemon (only), the check for whether we know the method comes before the filtering. --- test/containers.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/containers.c b/test/containers.c index 0d5ace35..f264fea2 100644 --- a/test/containers.c +++ b/test/containers.c @@ -1223,12 +1223,16 @@ static const AllowRulesTest allow_rules_tests[] = ALLOW_MESSAGE_FLAGS_NONE }, /* Must not manipulate Verbose/Stats (if supported) */ +#ifdef DBUS_ENABLE_VERBOSE_MODE { METHOD_RAISES_ACCESS_DENIED, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_VERBOSE, "EnableVerbose", NULL, ALLOW_MESSAGE_FLAGS_NONE }, +#endif +#ifdef DBUS_ENABLE_STATS { METHOD_RAISES_ACCESS_DENIED, DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, BUS_INTERFACE_STATS, "GetStats", NULL, ALLOW_MESSAGE_FLAGS_NONE }, +#endif /* Must not be able to inspect connections outside the container */ #if 0 -- 2.18.0.rc2