mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-16 13:20:11 +01:00
Fail if integrity option is used with LUKS1 format.
This commit is contained in:
@@ -999,7 +999,10 @@ static int action_luksFormat(void)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (luks_version == 2 && opt_integrity) {
|
if (luks_version != 2 && opt_integrity) {
|
||||||
|
log_err(_("Integrity option can be used only for LUKS2 format.\n"));
|
||||||
|
goto out;
|
||||||
|
} if (opt_integrity) {
|
||||||
r = crypt_parse_integrity_mode(opt_integrity, integrity, &integrity_keysize);
|
r = crypt_parse_integrity_mode(opt_integrity, integrity, &integrity_keysize);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
log_err(_("No known integrity specification pattern detected.\n"));
|
log_err(_("No known integrity specification pattern detected.\n"));
|
||||||
|
|||||||
Reference in New Issue
Block a user