Fix retry if entered passphrases (with verify option) do not match.
authorMilan Broz <mbroz@redhat.com>
Fri, 16 Mar 2012 15:31:15 +0000 (16:31 +0100)
committerMilan Broz <mbroz@redhat.com>
Fri, 16 Mar 2012 15:31:15 +0000 (16:31 +0100)
ChangeLog
lib/setup.c

index 9693ed5..9873ee8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2012-03-16  Milan Broz  <mbroz@redhat.com>
        * 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  <mbroz@redhat.com>
        * Add --master-key-file option to luksOpen (open using volume key).
index ce2eafa..80aa936 100644 (file)
@@ -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;