unbound service: some pre-chroot isolation
While entering the chroot should provide the same amount of isolation, the preStart script will run with full root privileges and so would benefit from some isolation as well (in particular due to unbound-anchor, which can perform network I/O).
This commit is contained in:
@@ -122,6 +122,10 @@ in
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.unbound}/bin/unbound -d -c ${stateDir}/unbound.conf";
|
||||
ExecStopPost="${pkgs.utillinux}/bin/umount ${stateDir}/dev/random";
|
||||
|
||||
ProtectSystem = true;
|
||||
ProtectHome = true;
|
||||
PrivateDevices = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user