From: Lennart Poettering Date: Thu, 9 Sep 2021 09:18:47 +0000 (+0200) Subject: dissect-image: don't do generic root partition fallback if verity is requested for... X-Git-Tag: v250-rc1~701^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=00a8b34fa7220ecf7f5069f550bee53f9fc5ee47;p=thirdparty%2Fsystemd.git dissect-image: don't do generic root partition fallback if verity is requested for /usr --- diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 566c073c29a..3279c843ecf 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -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