mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-13 20:00:08 +01:00
Print error message if crypt_load() detects unsupported version of LUKS.
This commit is contained in:
@@ -782,8 +782,11 @@ static int _crypt_load_luks(struct crypt_device *cd, const char *requested_type,
|
|||||||
* perform repair.
|
* perform repair.
|
||||||
*/
|
*/
|
||||||
r = _crypt_load_luks2(cd, cd->type != NULL, repair);
|
r = _crypt_load_luks2(cd, cd->type != NULL, repair);
|
||||||
} else
|
} else {
|
||||||
|
if (version > 2)
|
||||||
|
log_err(cd, _("Unsupported LUKS version %d."), version);
|
||||||
r = -EINVAL;
|
r = -EINVAL;
|
||||||
|
}
|
||||||
out:
|
out:
|
||||||
crypt_memzero(&hdr, sizeof(hdr));
|
crypt_memzero(&hdr, sizeof(hdr));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user