Merge pull request #85133 from snicket2100/mosquitto-service-sandboxing

mosquitto: systemd service sandboxing
wip/yesman
Sandro 4 years ago committed by GitHub
commit a390213f85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      nixos/modules/services/networking/mosquitto.nix

@ -232,6 +232,16 @@ in
Restart = "on-failure";
ExecStart = "${pkgs.mosquitto}/bin/mosquitto -c ${mosquittoConf}";
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 = ''
rm -f ${cfg.dataDir}/passwd

Loading…
Cancel
Save