Skip to content

Draft: Make policy checking faster

Adrian Szyndela requested to merge policy-hash into master

Dbus-daemon checks policy rules in linear way. This aims to replace checking of the "default context" part of policy with more efficient version:

  • list of rules is divided into shorter lists, indexed (in a hash table) by destination or sender or own name,
  • rule's position, as it would be in the original list, is assigned to each rule as an attribute ("score"),
  • the process of checking policy needs to find matching rules only in shorter lists indexed by matching names, plus wildcard rules,
  • a matched rule with the greatest "score" wins.

Merge request reports

Loading