1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-10 01:17:44 +03:00

dissect-image: don't do generic root partition fallback if verity is requested for /usr

This commit is contained in:
Lennart Poettering 2021-09-09 11:18:47 +02:00
parent cb241a69e3
commit 00a8b34fa7

View File

@ -1348,7 +1348,7 @@ int dissect_image(
if (!m->partitions[PARTITION_ROOT].found &&
!m->partitions[PARTITION_USR].found &&
(flags & DISSECT_IMAGE_GENERIC_ROOT) &&
(!verity || !verity->root_hash)) {
(!verity || !verity->root_hash || verity->designator != PARTITION_USR)) {
/* OK, we found nothing usable, then check if there's a single generic one distro, and use
* that. If the root hash was set however, then we won't fall back to a generic node, because