mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-02-01 06:50:26 +01:00
Get matching rules mostly working in the bus; only actually parsing the rule text remains. However, the client side of "signal connections" hasn't been started, this patch is only the bus side. * dbus/dispatch.c: fix for the matching rules changes * bus/driver.c (bus_driver_handle_remove_match) (bus_driver_handle_add_match): send an ack reply from these method calls * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of arguments, reported by Seth Nickell * bus/config-parser.c (append_rule_from_element): support eavesdrop=true|false attribute on policies so match rules can be prevented from snooping on the system bus. * bus/dbus-daemon-1.1.in: consistently use terminology "sender" and "destination" in attribute names; fix some docs bugs; add eavesdrop=true|false attribute * bus/driver.c (bus_driver_handle_add_match) (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch messages * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get rid of broadcast service concept, signals are just always broadcast * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c: mostly implement matching rules stuff (currently only exposed as signal connections)
20 lines
875 B
Text
20 lines
875 B
Text
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
|
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
|
<busconfig>
|
|
<!-- The following demonstrates how to punch holes in a default deny-all
|
|
policy so that a particular user can own a service, and other
|
|
connections can get messages from it -->
|
|
|
|
<!-- Only root can own the FooService service, and
|
|
this user can only send the one kind of message -->
|
|
<policy user="root">
|
|
<allow own="org.foo.FooService"/>
|
|
<allow send_interface="org.foo.FooBroadcastInterface"/>
|
|
</policy>
|
|
|
|
<!-- Allow any connection to receive the message, but
|
|
only if the message is sent by the owner of FooService -->
|
|
<policy context="default">
|
|
<allow receive_interface="org.foo.FooBroadcastInterface" receive_sender="org.foo.FooService"/>
|
|
</policy>
|
|
</busconfig>
|