internal bugfix: handle no-interface messages
No-interface messages should be handled in a special way.
Dbus says in bus/policy.c:
The interface is optional in messages. For allow rules, if the message
has no interface we want to skip the rule (and thus not allow);
for deny rules, if the message has no interface we want to use the
rule (and thus deny).
For example, a rule of type:
<deny send_type="method_call" send_interface="foo.bar"/>
should:
- deny method_calls with foo.bar interface;
- deny method_calls with no interface.
A rule of type:
<allow send_type="method_call" send_interface="foo.bar"/>
should:
- allow method_calls with foo.bar interface;
- not allow method_calls with not interface (the rule should be ignored).
The point is to make libdbuspolicy work as close as possible to how
dbus-daemon works with policies.
Change-Id: I99563d3728047a67fa4719948719a2df9c5d9f97