Fix open on devices with no supported VMKs

This commit is contained in:
Vojtěch Trefný
2019-11-13 18:34:33 +01:00
committed by Milan Broz
parent 565de3c536
commit fad592b512

View File

@@ -852,6 +852,9 @@ int BITLK_activate(struct crypt_device *cd,
/* only passphrase and recovery passphrase VMKs supported right now */
log_dbg(cd, "Skipping %s", get_vmk_protection_string(next_vmk->protection));
next_vmk = next_vmk->next;
if (r == 0)
/* we need to set error code in case we have only unsupported VMKs */
r = -ENOTSUP;
continue;
}