فهرست منبع

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
Marek Marczykowski-Górecki 5 سال پیش
والد
کامیت
89ee4931fb
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      qubesadmin/backup/restore.py

+ 1 - 1
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,