0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 22:20:30 +03:00

nixos/filesystems/zfs: Escape dataset names

Although unlikely, ZFS happily accepts names like 'zroot/foo -r'.

Escape names and separate command line options from arguments to avoid
any kind of misinterpretation.
This commit is contained in:
Klemens Nanni 2022-05-03 15:39:50 +02:00
parent 83beeb19ac
commit 2a341bd2f4

View file

@ -461,7 +461,7 @@ in
zfs load-key -a zfs load-key -a
'' ''
else concatMapStrings (fs: '' else concatMapStrings (fs: ''
zfs load-key ${fs} zfs load-key -- ${escapeShellArg fs}
'') cfgZfs.requestEncryptionCredentials} '') cfgZfs.requestEncryptionCredentials}
'') rootPools)); '') rootPools));
}; };