Fix memory deny write execute for nodejs services
This commit is contained in:
parent
a089d65d25
commit
d9533edad1
@ -38,7 +38,7 @@ in {
|
||||
User = "clightning";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10s";
|
||||
} // nix-bitcoin-services.defaultHardening;
|
||||
} // nix-bitcoin-services.nodeHardening;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ in {
|
||||
User = "nanopos";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10s";
|
||||
} // nix-bitcoin-services.defaultHardening;
|
||||
} // nix-bitcoin-services.nodeHardening;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,11 +1,22 @@
|
||||
{
|
||||
let
|
||||
defaultHardening = {
|
||||
PrivateTmp = "true";
|
||||
ProtectSystem = "full";
|
||||
ProtectHome = "true";
|
||||
NoNewPrivileges = "true";
|
||||
PrivateDevices = "true";
|
||||
MemoryDenyWriteExecute = "true";
|
||||
ProtectKernelTunables = "true";
|
||||
ProtectKernelModules = "true";
|
||||
ProtectControlGroups = "true";
|
||||
RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6";
|
||||
LockPersonality = "true";
|
||||
};
|
||||
in
|
||||
{
|
||||
inherit defaultHardening;
|
||||
# node applications apparently rely on memory write execute
|
||||
nodeHardening = defaultHardening // { MemoryDenyWriteExecute = "false"; };
|
||||
}
|
||||
|
||||
|
||||
|
@ -64,7 +64,7 @@ in {
|
||||
User = "clightning";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "10s";
|
||||
} // nix-bitcoin-services.defaultHardening;
|
||||
} // nix-bitcoin-services.nodeHardening;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user