mail-filter/sqlgrey: systemd .service hardening
authorCraig Andrews <candrews@integralblue.com>
Thu, 30 Jun 2016 15:55:03 +0000 (11:55 -0400)
committerMichał Górny <mgorny@gentoo.org>
Sat, 26 Nov 2016 19:08:24 +0000 (20:08 +0100)
Bug: https://bugs.gentoo.org/587596
Closes: https://github.com/gentoo/gentoo/pull/1800

mail-filter/sqlgrey/files/sqlgrey.service
mail-filter/sqlgrey/sqlgrey-1.7.6-r2.ebuild [moved from mail-filter/sqlgrey/sqlgrey-1.7.6-r1.ebuild with 100% similarity]

index f6be356b11e70ca93afb780a6cb29ededc8c0ffa..a3171863e22aa6958fe909a66daad0f43254d28d 100644 (file)
@@ -3,7 +3,20 @@ Description=SQLgrey Postfix Grey-listing Policy service
 After=network.target
 
 [Service]
+User=sqlgrey
+Group=sqlgrey
 ExecStart=/usr/sbin/sqlgrey
+CapabilityBoundingSet=
+PrivateTmp=yes
+PrivateDevices=yes
+ProtectSystem=full
+ProtectHome=yes
+NoNewPrivileges=yes
+MemoryDenyWriteExecute=true
+ProtectKernelModules=true
+ProtectKernelTunables=true
+ProtectControlGroups=true
+RestrictRealtime=true
 
 [Install]
 WantedBy=multi-user.target