From c956222afecdce220d0ca46a284fc48550af063d Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 7 Oct 2016 21:26:36 +0100 Subject: [PATCH 3/3] Ignore ActivationFailure if not using systemd activation This isn't security-related, just defensive programming: if dbus-daemon wasn't run with --systemd-activation, then there is no reason why systemd would legitimately send us this signal, and if it does we should just ignore it. Signed-off-by: Simon McVittie --- bus/driver.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bus/driver.c b/bus/driver.c index 24ac44f..41ca445 100644 --- a/bus/driver.c +++ b/bus/driver.c @@ -2664,6 +2664,14 @@ bus_driver_handle_message (DBusConnection *connection, return TRUE; } + if (!bus_context_get_systemd_activation (context)) + { + bus_context_log (context, DBUS_SYSTEM_LOG_WARNING, + "Ignoring unexpected ActivationFailure message " + "while not using systemd activation"); + return FALSE; + } + return dbus_activation_systemd_failure(bus_context_get_activation(context), message); } -- 2.9.3