From: Simon McVittie Date: Fri, 7 Oct 2016 20:26:36 +0000 (+0100) Subject: Ignore ActivationFailure if not using systemd activation X-Git-Tag: dbus-1.11.6~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=12720d6e2832b68bec95b33fc7713adc33ee89fc;p=thirdparty%2Fdbus.git 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 Reviewed-by: Colin Walters Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98157 --- diff --git a/bus/driver.c b/bus/driver.c index 24ac44f70..41ca445bf 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); }