From 89ee4931fb0275fe750e165e184bba0ed9a5898f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 9 Jan 2019 19:09:44 +0100 Subject: [PATCH] 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 --- qubesadmin/backup/restore.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubesadmin/backup/restore.py b/qubesadmin/backup/restore.py index 3963c58..1dedff1 100644 --- a/qubesadmin/backup/restore.py +++ b/qubesadmin/backup/restore.py @@ -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,