]> granicus.if.org Git - ejabberd/commitdiff
Harden the systemd unit
authorCraig Andrews <candrews@integralblue.com>
Tue, 28 Jun 2016 21:02:41 +0000 (17:02 -0400)
committerGitHub <noreply@github.com>
Tue, 28 Jun 2016 21:02:41 +0000 (17:02 -0400)
Restrict capabilities, have a private tmp directory, private /dev, and don't accessing file system locations that really shouldn't be accessed.

ejabberd.service.template

index 80b15adbdd6508e25cec39987a202ef1656d2096..49ba14737caa0ed4e597291fa2a9c7ca060bd809 100644 (file)
@@ -12,6 +12,13 @@ ExecStop=@ctlscriptpath@/ejabberdctl stop
 ExecReload=@ctlscriptpath@/ejabberdctl reload_config
 Type=oneshot
 RemainAfterExit=yes
+# The CAP_DAC_OVERRIDE capability is required for pam authentication to work
+CapabilityBoundingSet=CAP_DAC_OVERRIDE
+PrivateTmp=true
+PrivateDevices=true
+ProtectHome=true
+ProtectSystem=full
+NoNewPrivileges=true
 
 [Install]
 WantedBy=multi-user.target