From be246c16abd1882bda2516bbe21d38259bd5d130 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Sun, 9 Oct 2011 13:46:14 +0000 Subject: [PATCH] Fix exit code if passphrases do not match in luksAddKey. (Issue 109) git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@625 36d66b0a-2a48-0410-832c-cd162a569da5 --- ChangeLog | 1 + lib/utils_crypt.c | 1 + 2 files changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index fc6731e..87832e9 100644 --- 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 * Support key-slot option for luksOpen (use only explicit keyslot). diff --git a/lib/utils_crypt.c b/lib/utils_crypt.c index 5bedc09..59582af 100644 --- a/lib/utils_crypt.c +++ b/lib/utils_crypt.c @@ -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; } } -- 2.7.4