new file mode 100644
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: CC0-1.0
+# SPDX-FileCopyrightText: 2023 Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+
+SUBSYSTEM=="gpio", KERNEL=="gpiochip[0-9]*", GROUP="gpio", MODE="0660"
new file mode 100644
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: CC0-1.0
+# SPDX-FileCopyrightText: 2023-2024 Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
+
+[Unit]
+Description=Centralized GPIO manager daemon
+
+[Service]
+Type=dbus
+BusName=io.gpiod1
+ExecStart=/usr/bin/gpio-manager
+Restart=always
+User=gpio-manager
+
+CapabilityBoundingSet=
+ReadOnlyDirectories=/
+NoNewPrivileges=yes
+RemoveIPC=yes
+PrivateTmp=yes
+PrivateUsers=yes
+ProtectControlGroups=yes
+ProtectHome=yes
+ProtectKernelModules=yes
+ProtectKernelTunables=yes
+ProtectSystem=strict
+ProtectClock=yes
+Delegate=no
+IPAddressDeny=any
+KeyringMode=private
+LockPersonality=yes
+MemoryDenyWriteExecute=yes
+NotifyAccess=main
+PrivateMounts=no
+PrivateNetwork=no
+ProtectHostname=yes
+RestrictNamespaces=yes
+RestrictRealtime=yes
+RestrictSUIDSGID=yes
+SystemCallFilter=~@clock
+SystemCallFilter=~@cpu-emulation
+SystemCallFilter=~@debug
+SystemCallFilter=~@module
+SystemCallFilter=~@mount
+SystemCallFilter=~@obsolete
+SystemCallFilter=~@privileged
+SystemCallFilter=~@raw-io
+SystemCallFilter=~@reboot
+SystemCallFilter=~@swap
+
+[Install]
+WantedBy=multi-user.target
new file mode 100644
@@ -0,0 +1,41 @@
+<!-- SPDX-License-Identifier: CC-BY-SA-4.0.txt -->
+<!-- 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>