Skip to content

Commit a08cb5d

Browse files
server: Restrict more things at systemd level
1 parent d00aa1c commit a08cb5d

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

server/data/oo7-daemon.service.in

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,37 @@
11
[Unit]
22
Description=Secret service (oo7 implementation)
3+
34
[Service]
45
Type=simple
56
StandardError=journal
67
ExecStart=@libexecdir@/@binary@
78
Restart=on-failure
9+
TimeoutStartSec=30s
10+
TimeoutStopSec=30s
11+
12+
# Only allow CAP_IPC_LOCK
13+
CapabilityBoundingSet=CAP_IPC_LOCK
14+
AmbientCapabilities=CAP_IPC_LOCK
15+
16+
# Prevent privilege escalation (blocks suid, new caps, etc.)
17+
NoNewPrivileges=true
18+
19+
# Clear supplementary groups
20+
SupplementaryGroups=
21+
22+
# Restrict filesystem access
23+
ProtectSystem=full
24+
PrivateTmp=yes
25+
PrivateDevices=yes
26+
27+
# No network needed
28+
PrivateNetwork=yes
29+
30+
ProtectKernelTunables=yes
31+
ProtectKernelModules=yes
32+
ProtectControlGroups=yes
33+
MemoryDenyWriteExecute=yes
34+
ProtectClock=yes
35+
836
[Install]
937
WantedBy=default.target

0 commit comments

Comments
 (0)