From 78cac9a97c75b2bb171c04848b7250b03ab45538 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Fri, 16 Mar 2012 16:31:15 +0100 Subject: [PATCH] Fix retry if entered passphrases (with verify option) do not match. --- ChangeLog | 1 + lib/setup.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9693ed5e..9873ee8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2012-03-16 Milan Broz * Unify password verification option. * Support password verification with quiet flag if possible. (1.2.0) + * Fix retry if entered passphrases (with verify option) do not match. 2012-02-11 Milan Broz * Add --master-key-file option to luksOpen (open using volume key). diff --git a/lib/setup.c b/lib/setup.c index ce2eafa6..80aa936b 100644 --- a/lib/setup.c +++ b/lib/setup.c @@ -379,6 +379,9 @@ static int volume_key_by_terminal_passphrase(struct crypt_device *cd, int keyslo r = key_from_terminal(cd, NULL, &passphrase_read, &passphrase_size_read, 0); + /* Continue if it is just passphrase verify mismatch */ + if (r == -EPERM) + continue; if(r < 0) goto out;