summaryrefslogtreecommitdiff
path: root/bus/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'bus/driver.c')
-rw-r--r--bus/driver.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/bus/driver.c b/bus/driver.c
index 9551f3d4..f494170c 100644
--- a/bus/driver.c
+++ b/bus/driver.c
@@ -2061,8 +2061,26 @@ bus_driver_handle_message (DBusConnection *connection,
if (dbus_message_is_signal (message, "org.freedesktop.systemd1.Activator", "ActivationFailure"))
{
BusContext *context;
+ DBusConnection *systemd;
context = bus_connection_get_context (connection);
+ systemd = bus_driver_get_owner_of_name (connection,
+ "org.freedesktop.systemd1");
+
+ if (systemd != connection)
+ {
+ const char *attacker;
+
+ attacker = bus_connection_get_name (connection);
+ bus_context_log (context, DBUS_SYSTEM_LOG_SECURITY,
+ "Ignoring forged ActivationFailure message from "
+ "connection %s (%s)",
+ attacker ? attacker : "(unauthenticated)",
+ bus_connection_get_loginfo (connection));
+ /* ignore it */
+ return TRUE;
+ }
+
return dbus_activation_systemd_failure(bus_context_get_activation(context), message);
}