]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Ignore ActivationFailure if not using systemd activation
authorSimon McVittie <smcv@debian.org>
Fri, 7 Oct 2016 20:26:36 +0000 (21:26 +0100)
committerSimon McVittie <smcv@debian.org>
Mon, 10 Oct 2016 09:06:26 +0000 (10:06 +0100)
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

bus/driver.c

index 660f04d983d6f5569857300a0cd8f4dbfc5a932f..b7e1a0a020412012f0a60ce9c0b8b319cd2498c1 100644 (file)
@@ -2643,6 +2643,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);
     }