소스 검색

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,