summaryrefslogtreecommitdiff
path: root/test/bus-policy/test.conf
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-26 20:58:34 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-26 20:58:34 +0100
commit55e189007c707fb827b8b287903c258de234bd12 (patch)
tree1fd898544668a917194646cc23ea35049e4ccd5c /test/bus-policy/test.conf
parent3a9cca11042331fc053ac1aa6363603622f1188c (diff)
bus-policy: also add in other bus policy tests from dbus1
dbus1 only checks if these files parse correctly so let's do the same for now.
Diffstat (limited to 'test/bus-policy/test.conf')
-rw-r--r--test/bus-policy/test.conf20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/bus-policy/test.conf b/test/bus-policy/test.conf
new file mode 100644
index 0000000000..ee6afcdfbb
--- /dev/null
+++ b/test/bus-policy/test.conf
@@ -0,0 +1,20 @@
+<!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>