backup: do not fail restore if scrypt anticipate more time needed
For various reasons, decryption may be slower than initial encryption (different hardware, different system load etc). Do not fail the restore operation if scrypt anticipate it will take considerably more time or memory, than while creating the backup (where the scrypt parameters were originally set). Thanks to @jharveyb for the report and suggested solution. Fixes QubesOS/qubes-issues#4683
This commit is contained in:
parent
61cc6b008e
commit
89ee4931fb
@ -227,7 +227,7 @@ def launch_scrypt(action, input_name, output_name, passphrase):
|
||||
:param passphrase: passphrase
|
||||
:return: subprocess.Popen object
|
||||
'''
|
||||
command_line = ['scrypt', action, input_name, output_name]
|
||||
command_line = ['scrypt', action, '-f', input_name, output_name]
|
||||
(p, pty) = launch_proc_with_pty(command_line,
|
||||
stdin=subprocess.PIPE if input_name == '-' else None,
|
||||
stdout=subprocess.PIPE if output_name == '-' else None,
|
||||
|
Loading…
Reference in New Issue
Block a user