about summary refs log tree commit diff
path: root/dist/mastodon-streaming.service
diff options
context:
space:
mode:
authorYurii Izorkin <izorkin@elven.pw>2021-10-25 17:31:20 +0300
committerGitHub <noreply@github.com>2021-10-25 16:31:20 +0200
commita9ff5c830951eead9c4cfa04532d378220ccd8e4 (patch)
tree6553c853b878b8c3f7ba560d18b10ad2e35663c3 /dist/mastodon-streaming.service
parentc8ce728705c0a5f85e55ed68101938a04f94ffb3 (diff)
templates/systemd/mastodon: update sandbox mode (#16235)
* templates/systemd/mastodon: add new sandboxing options

* templates/systemd/mastodon: add '@privileged' and remove duplicates SystemCallFilters

* templates/systemd/mastodon: add '@ipc' SystemCallFilter

* templates/systemd/mastodon: add '@memlock' SystemCallFilter

* templates/systemd/mastodon: allow '@resources' filter to mastodon-web service
Diffstat (limited to 'dist/mastodon-streaming.service')
-rw-r--r--dist/mastodon-streaming.service8
1 files changed, 7 insertions, 1 deletions
diff --git a/dist/mastodon-streaming.service b/dist/mastodon-streaming.service
index 0befc529a..6d71298a5 100644
--- a/dist/mastodon-streaming.service
+++ b/dist/mastodon-streaming.service
@@ -12,6 +12,9 @@ Environment="STREAMING_CLUSTER_NUM=1"
 ExecStart=/usr/bin/node ./streaming
 TimeoutSec=15
 Restart=always
+# Proc filesystem
+ProcSubset=pid
+ProtectProc=invisible
 # Capabilities
 CapabilityBoundingSet=
 # Security
@@ -34,11 +37,14 @@ RestrictNamespaces=true
 LockPersonality=true
 RestrictRealtime=true
 RestrictSUIDSGID=true
+RemoveIPC=true
 PrivateMounts=true
 ProtectClock=true
 # System Call Filtering
 SystemCallArchitectures=native
-SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @privileged @raw-io @reboot @resources @setuid @swap
+SystemCallFilter=~@cpu-emulation @debug @keyring @ipc @memlock @mount @obsolete @privileged @resources @setuid
+SystemCallFilter=pipe
+SystemCallFilter=pipe2
 
 [Install]
 WantedBy=multi-user.target