nixos/slurm: fix creation of slurmdbd config file
replace cp/chmod by install to avoid security issues. See https://github.com/NixOS/nixpkgs/issues/121293
This commit is contained in:
parent
a5c0b6fc95
commit
d07185f986
|
@ -403,9 +403,7 @@ in
|
|||
requires = [ "munged.service" "mysql.service" ];
|
||||
|
||||
preStart = ''
|
||||
cp ${slurmdbdConf} ${configPath}
|
||||
chmod 600 ${configPath}
|
||||
chown ${cfg.user} ${configPath}
|
||||
install -m 600 -o ${cfg.user} -T ${slurmdbdConf} ${configPath}
|
||||
${optionalString (cfg.dbdserver.storagePassFile != null) ''
|
||||
echo "StoragePass=$(cat ${cfg.dbdserver.storagePassFile})" \
|
||||
>> ${configPath}
|
||||
|
|
Loading…
Reference in a new issue