Add LUKS2 uuid component in underlying dm-integrity device.

This commit is contained in:
Ondrej Kozina
2019-06-20 14:22:34 +02:00
committed by Milan Broz
parent 59bed375d0
commit 249e6af3a6
2 changed files with 4 additions and 3 deletions

View File

@@ -2239,9 +2239,9 @@ static int _compare_device_types(struct crypt_device *cd,
return -EINVAL;
}
if (isLUKS2(cd->type) && !src->uuid) {
if (strncmp("INTEGRITY-", tgt->uuid, strlen("INTEGRITY-"))) {
log_dbg(cd, "Unexpected uuid prefix %s in target integrity device.", tgt->uuid);
if (isLUKS2(cd->type) && !strncmp("INTEGRITY-", tgt->uuid, strlen("INTEGRITY-"))) {
if (crypt_uuid_cmp(tgt->uuid, src->uuid)) {
log_dbg(cd, "LUKS UUID mismatch.");
return -EINVAL;
}
} else if (isLUKS(cd->type)) {