mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-14 20:30:04 +01:00
Wipe LUKS header if luksFormat fails to add first keyslot.
This commit is contained in:
committed by
Milan Broz
parent
9d7cc152f9
commit
622943529e
@@ -1066,8 +1066,10 @@ static int action_luksFormat(void)
|
||||
r = crypt_keyslot_add_by_volume_key(cd, opt_key_slot,
|
||||
key, keysize,
|
||||
password, passwordLen);
|
||||
if (r < 0) /* FIXME: call wipe signatures again */
|
||||
if (r < 0) {
|
||||
(void) tools_wipe_all_signatures(header_device);
|
||||
goto out;
|
||||
}
|
||||
tools_keyslot_msg(r, CREATED);
|
||||
|
||||
if (opt_integrity && !opt_integrity_no_wipe)
|
||||
|
||||
Reference in New Issue
Block a user