diff options
author | Simon McVittie <smcv@debian.org> | 2016-10-07 21:26:36 +0100 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2016-10-10 10:05:30 +0100 |
commit | 12720d6e2832b68bec95b33fc7713adc33ee89fc (patch) | |
tree | da742dd474e165e363864736fe89f961b0ac3eb6 | |
parent | 3da9ad2a9fcd9ae07f6c04b00594349806aad1f9 (diff) |
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 <smcv@debian.org>
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98157
-rw-r--r-- | bus/driver.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bus/driver.c b/bus/driver.c index 24ac44f7..41ca445b 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); } |