Fix exit code if passphrases do not match in luksAddKey. (Issue 109)
authorMilan Broz <gmazyland@gmail.com>
Sun, 9 Oct 2011 13:46:14 +0000 (13:46 +0000)
committerMilan Broz <gmazyland@gmail.com>
Sun, 9 Oct 2011 13:46:14 +0000 (13:46 +0000)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@625 36d66b0a-2a48-0410-832c-cd162a569da5

ChangeLog
lib/utils_crypt.c

index fc6731e..87832e9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
        * If device is not rotational, do not use Gutmann wipe method.
        * Add crypt_last_error() API call.
        * Fix luksKillSLot exit code if slot is inactive or invalid.
+       * Fix exit code if passphrases do not match in luksAddKey.
 
 2011-09-22  Milan Broz  <mbroz@redhat.com>
        * Support key-slot option for luksOpen (use only explicit keyslot).
index 5bedc09..59582af 100644 (file)
@@ -235,6 +235,7 @@ static int crypt_get_key_tty(const char *prompt,
 
                if (strncmp(pass, pass_verify, key_size_max)) {
                        log_err(cd, _("Passphrases do not match.\n"));
+                       r = -EPERM;
                        goto out_err;
                }
        }