From 860658f2f671f6a68a35cbb68444a9cca5c64e1a Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Sat, 7 Nov 2015 14:27:25 +0100 Subject: [PATCH 1/4] bus_driver_handle_update_activation_environment: Error on system buses The default policy already disallows calls on system buses. Since any bus with a service helper cleans the environment anyway, there's no point in allowing this to be called. --- bus/driver.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bus/driver.c b/bus/driver.c index 852ac53..1c4a311 100644 --- a/bus/driver.c +++ b/bus/driver.c @@ -1011,6 +1011,18 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection, } #endif + { + BusContext *context = bus_connection_get_context (connection); + + if (bus_context_get_servicehelper (context) != NULL) + { + dbus_set_error (error, DBUS_ERROR_ACCESS_DENIED, + "Cannot change activation environment " + "on a system bus."); + return FALSE; + } + } + activation = bus_connection_get_activation (connection); dbus_message_iter_init (message, &iter); -- 2.6.2