瀏覽代碼

add some sys caps & restrictions to tpsgi.service

Mostly scraped from apache.
George Baugh 4 月之前
父節點
當前提交
e0e216efee
共有 1 個文件被更改,包括 17 次插入 和 0 次删除
  1. 17 0
      service/tpsgi.tmpl

+ 17 - 0
service/tpsgi.tmpl

@@ -15,3 +15,20 @@ WorkingDirectory=__REPLACEME__/
 Restart=always
 OOMPolicy=stop
 ExecReload=kill -HUP $MAINPID
+AmbientCapabilities=CAP_SYS_RESOURCE CAP_SYS_NICE
+LockPersonality=yes
+MemoryDenyWriteExecute=yes
+OOMPolicy=continue
+PrivateDevices=yes
+PrivateTmp=true
+ProtectClock=yes
+ProtectControlGroups=yes
+ProtectHome=read-only
+ProtectHostname=yes
+ProtectKernelLogs=yes
+ProtectKernelModules=yes
+ProtectKernelTunables=yes
+ProtectSystem=yes
+RestrictNamespaces=yes
+RestrictRealtime=yes
+RestrictSUIDSGID=yes