mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-14 04:10:06 +01:00
Fix verbose message about key removal in luksKillSlot,luksErase and luksKremoveKey.
The crypt_keyslot_destroy() does not return keyslot number, so return value 0 was always used as a keyslot reference.
This commit is contained in:
@@ -1288,7 +1288,7 @@ static int action_luksKillSlot(void)
|
||||
}
|
||||
|
||||
r = crypt_keyslot_destroy(cd, opt_key_slot);
|
||||
tools_keyslot_msg(r, REMOVED);
|
||||
tools_keyslot_msg(opt_key_slot, REMOVED);
|
||||
out:
|
||||
crypt_free(cd);
|
||||
return r;
|
||||
@@ -1341,7 +1341,7 @@ static int action_luksRemoveKey(void)
|
||||
}
|
||||
|
||||
r = crypt_keyslot_destroy(cd, opt_key_slot);
|
||||
tools_keyslot_msg(r, REMOVED);
|
||||
tools_keyslot_msg(opt_key_slot, REMOVED);
|
||||
out:
|
||||
crypt_safe_free(password);
|
||||
crypt_free(cd);
|
||||
@@ -1911,7 +1911,7 @@ static int action_luksErase(void)
|
||||
r = crypt_keyslot_destroy(cd, i);
|
||||
if (r < 0)
|
||||
goto out;
|
||||
tools_keyslot_msg(r, REMOVED);
|
||||
tools_keyslot_msg(i, REMOVED);
|
||||
}
|
||||
}
|
||||
out:
|
||||
|
||||
Reference in New Issue
Block a user