mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
Merge pull request #85133 from snicket2100/mosquitto-service-sandboxing
mosquitto: systemd service sandboxing
This commit is contained in:
commit
a390213f85
@ -232,6 +232,16 @@ in
|
|||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
ExecStart = "${pkgs.mosquitto}/bin/mosquitto -c ${mosquittoConf}";
|
ExecStart = "${pkgs.mosquitto}/bin/mosquitto -c ${mosquittoConf}";
|
||||||
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||||
|
|
||||||
|
ProtectSystem = "strict";
|
||||||
|
ProtectHome = true;
|
||||||
|
PrivateDevices = true;
|
||||||
|
PrivateTmp = true;
|
||||||
|
ReadWritePaths = "${cfg.dataDir}";
|
||||||
|
ProtectControlGroups = true;
|
||||||
|
ProtectKernelModules = true;
|
||||||
|
ProtectKernelTunables = true;
|
||||||
|
NoNewPrivileges = true;
|
||||||
};
|
};
|
||||||
preStart = ''
|
preStart = ''
|
||||||
rm -f ${cfg.dataDir}/passwd
|
rm -f ${cfg.dataDir}/passwd
|
||||||
|
Loading…
Reference in New Issue
Block a user