Explorar o código

scripts: apply hardening for systemd service (#5332)

Bogdan Khomutsky %!s(int64=6) %!d(string=hai) anos
pai
achega
66016b8499
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      scripts/systemd/gogs.service

+ 4 - 0
scripts/systemd/gogs.service

@@ -18,6 +18,10 @@ WorkingDirectory=/home/git/gogs
 ExecStart=/home/git/gogs/gogs web
 Restart=always
 Environment=USER=git HOME=/home/git
+# Hardening
+ProtectSystem=full
+PrivateDevices=yes
+PrivateTmp=yes
 
 [Install]
 WantedBy=multi-user.target