backups: Prompt for password twice for verification

This commit is contained in:
Marek Marczykowski-Górecki 2013-11-25 05:42:47 +01:00
parent c781a522d8
commit 3a898db663

View File

@ -102,6 +102,10 @@ def main():
exit (0)
passphrase = getpass.getpass("Please enter the pass phrase that will be used to encrypt/verify the backup: ")
passphrase2 = getpass.getpass("Enter again for verification: ")
if passphrase != passphrase2:
print >>sys.stderr, "ERROR: Password mismatch"
exit(1)
try:
backup_do(base_backup_dir, files_to_backup, passphrase,