feat: Use systemd sandboxing for daemon process

The server process is limited to certain locations via the sandboxing of
systemd. These restrictions also apply to the control programs and
their specified users.
This commit is contained in:
2024-09-12 15:59:05 +02:00
parent c9877d8230
commit b12a52623b

View File

@@ -9,5 +9,17 @@ PIDFile=/var/run/revpipyload.pid
ExecStart=/usr/share/revpipyload/revpipyloadd -d $DAEMON_OPTS
ExecReload=/bin/kill -HUP $MAINPID
# systemd sandboxing process
ProtectSystem=strict
ProtectControlGroups=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
# Allow write operations to the following destinations
ReadWritePaths=/dev/piControl0 /etc/revpipyload/ /etc/revpi/config.rsc /home/ /var/lib/revpipyload/ /var/log/ /var/run/revpipyload.pid
# Restrict file system access to the following directories
InaccessiblePaths=/boot /root
[Install]
WantedBy=multi-user.target