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.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92857
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
{
dbus_bool_t retval;
BusActivation *activation;
+ BusContext *context;
DBusMessageIter iter;
DBusMessageIter dict_iter;
DBusMessageIter dict_entry_iter;
}
#endif
+ 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);