mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-19 06:40:08 +01:00
Check passphrase for user selected keyslot only.
When adding new keyslot we check if provided existing passphrase is correct first. Since user may now select specific existing keyslot (to extract volume key) it's no use to check any matching keyslot. Test passphrase only for user specified keyslot.
This commit is contained in:
committed by
Milan Broz
parent
717bd0665d
commit
15c3a2a2a9
@@ -2216,7 +2216,7 @@ static int action_luksAddKey(void)
|
||||
goto out;
|
||||
|
||||
/* Check password before asking for new one */
|
||||
r = crypt_activate_by_passphrase(cd, NULL, CRYPT_ANY_SLOT,
|
||||
r = crypt_activate_by_passphrase(cd, NULL, keyslot_old,
|
||||
password, password_size, 0);
|
||||
check_signal(&r);
|
||||
tools_passphrase_msg(r);
|
||||
|
||||
Reference in New Issue
Block a user