Files

45 lines
1.3 KiB
Desktop File
Raw Permalink Normal View History

# varde system service. Pairs with varde.socket for socket activation;
# also runs standalone (the daemon binds its own socket when not
# activated).
[Unit]
Description=varde content-addressed blob mirror daemon
Documentation=man:varde(8)
After=network.target
Requires=varde.socket
[Service]
Type=notify
ExecStart=/usr/bin/varde-daemon --system
Restart=on-failure
# Hardening
DynamicUser=yes
StateDirectory=varde
# No RuntimeDirectory= here: varde.socket creates /run/varde for its
# socket file, and the service only uses the activation socket. With
# RuntimeDirectory= on the service, stopping it removed the socket file
# from under the socket unit (0.1.6 and earlier), and preserving it
# (0.1.7/0.1.8) made systemd privatise the directory under DynamicUser -
# /run/varde -> /run/private/varde, 0700 - so no unprivileged client
# could connect at all.
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes
PrivateTmp=yes
PrivateDevices=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectControlGroups=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
LockPersonality=yes
MemoryDenyWriteExecute=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
CapabilityBoundingSet=
[Install]
WantedBy=multi-user.target