Merge pull request #27627 from volth/zookeeper-escape-shell

nixos/zookeeper: escape cfg.extraCmdLineOptions

authored by

Jörg Thalheim and committed by
GitHub
97544a6c fb9120d5

+3 -3
+3 -3
nixos/modules/services/misc/zookeeper.nix
··· 4 4 5 5 let 6 6 cfg = config.services.zookeeper; 7 - 7 + 8 8 zookeeperConfig = '' 9 9 dataDir=${cfg.dataDir} 10 10 clientPort=${toString cfg.port} ··· 49 49 default = 1; 50 50 type = types.int; 51 51 }; 52 - 52 + 53 53 extraConf = mkOption { 54 54 description = "Extra configuration for Zookeeper."; 55 55 type = types.lines; ··· 119 119 ExecStart = '' 120 120 ${pkgs.jre}/bin/java \ 121 121 -cp "${pkgs.zookeeper}/lib/*:${pkgs.zookeeper}/${pkgs.zookeeper.name}.jar:${configDir}" \ 122 - ${toString cfg.extraCmdLineOptions} \ 122 + ${escapeShellArgs cfg.extraCmdLineOptions} \ 123 123 -Dzookeeper.datadir.autocreate=false \ 124 124 ${optionalString cfg.preferIPv4 "-Djava.net.preferIPv4Stack=true"} \ 125 125 org.apache.zookeeper.server.quorum.QuorumPeerMain \