sd_event_source_disable_unref(q->defer_event_source);
- while ((a = q->authorized_actions)) {
- LIST_REMOVE(authorized, q->authorized_actions, a);
+ while ((a = LIST_POP(authorized, q->authorized_actions)))
async_polkit_query_action_free(a);
- }
async_polkit_query_action_free(q->denied_action);
async_polkit_query_action_free(q->error_action);
assert(reply);
assert(q);
+ /* Processing of a PolicyKit checks is canceled on the first auth. error. */
+ assert(!q->denied_action);
+ assert(!q->error_action);
+ assert(!sd_bus_error_is_set(&q->error));
+
assert(q->action);
a = TAKE_PTR(q->action);
/* Treat no PK available as access denied */
q->denied_action = TAKE_PTR(a);
-
return 0;
}
if (r < 0)
return r;
- /* It's currently expected that processing of a DBus message shall be interrupted on the first
- * auth. error */
- assert(!q->denied_action);
- assert(!q->error_action);
- assert(!sd_bus_error_is_set(&q->error));
-
if (authorized)
LIST_PREPEND(authorized, q->authorized_actions, TAKE_PTR(a));
else if (challenge) {