services: add finer-grained address family restrictions
Due to a possible NixOS bug, this commit has no effect on NixOS 20.09 where `RestrictAddressFamilies` is a no-op. It's only relevant for NixOS unstable with cgroups v2. bitcoind+zmq: instead of allowing all address families, only add the required AF_NETLINK family. lnd: lnd only runs a zmq client, not a server, therefore it requires no additional address families. lightning-pool, clightning-plugin-zmq: add AF_NETLINK.
This commit is contained in:
@@ -33,6 +33,10 @@ let self = {
|
||||
SystemCallArchitectures = "native";
|
||||
};
|
||||
|
||||
allowNetlink = {
|
||||
RestrictAddressFamilies = self.defaultHardening.RestrictAddressFamilies + " AF_NETLINK";
|
||||
};
|
||||
|
||||
# nodejs applications apparently rely on memory write execute
|
||||
nodejs = { MemoryDenyWriteExecute = "false"; };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user