1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
<!-- SPDX-License-Identifier: CC-BY-SA-4.0 -->
<!-- SPDX-FileCopyrightText: 2022-2024 Bartosz Golaszewski <bartosz.golaszewski@linaro.org> -->
<!-- This configuration file specifies the required security policies
for the gpio-dbus daemon to work. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Everyone can list GPIO devices and see their properties. -->
<policy context="default">
<allow send_destination="io.gpiod1"
send_interface="org.freedesktop.DBus.Peer"
send_member="Ping"/>
<allow send_destination="io.gpiod1"
send_interface="org.freedesktop.DBus.Introspectable"/>
<allow send_destination="io.gpiod1"
send_interface="org.freedesktop.DBus.Properties"/>
<allow send_destination="io.gpiod1"
send_interface="org.freedesktop.DBus.ObjectManager"/>
</policy>
<!-- Daemon must run as the `gpio-manager` user. -->
<policy user="gpio-manager">
<allow own="io.gpiod1"/>
</policy>
<!-- Members of the `gpio` group can request and manipulate GPIO lines. -->
<policy group="gpio">
<allow send_destination="io.gpiod1"/>
</policy>
<!-- Root can do anything. -->
<policy user="root">
<allow own="io.gpiod1"/>
<allow send_destination="io.gpiod1"/>
</policy>
</busconfig>
|