diff options
Diffstat (limited to 'bus/bus.c')
-rw-r--r-- | bus/bus.c | 28 |
1 files changed, 13 insertions, 15 deletions
@@ -1563,6 +1563,7 @@ bus_context_check_security_policy (BusContext *context, dbus_bool_t requested_reply; const char *privilege; char *out_rule = NULL; + BusResult can_send_result; type = dbus_message_get_type (message); src = dbus_message_get_sender (message); @@ -1748,18 +1749,16 @@ bus_context_check_security_policy (BusContext *context, log = FALSE; if (sender_policy) { - switch (bus_client_policy_check_can_send (sender, - sender_policy, - context->registry, - requested_reply, - addressed_recipient, - proposed_recipient, - message, &toggles, &log, &privilege, - deferred_message, &out_rule)) + can_send_result = bus_client_policy_check_can_send (sender, + sender_policy, + context->registry, + requested_reply, + addressed_recipient, + proposed_recipient, + message, &toggles, &log, &privilege, + deferred_message, &out_rule); + if (can_send_result == BUS_RESULT_FALSE) { - case BUS_RESULT_TRUE: - break; - case BUS_RESULT_FALSE: complain_about_message (context, DBUS_ERROR_ACCESS_DENIED, "Rejected send message", toggles, message, sender, proposed_recipient, requested_reply, @@ -1770,10 +1769,6 @@ bus_context_check_security_policy (BusContext *context, if (out_rule) free (out_rule); return BUS_RESULT_FALSE; - break; - case BUS_RESULT_LATER: - return BUS_RESULT_LATER; - break; } } @@ -1813,6 +1808,9 @@ bus_context_check_security_policy (BusContext *context, } } + if (can_send_result == BUS_RESULT_LATER) + return BUS_RESULT_LATER; + /* See if limits on size have been exceeded */ if (!bus_context_check_recipient_message_limits(context, proposed_recipient, sender, message, requested_reply, error)) |