]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dissect-image: don't do generic root partition fallback if verity is requested for...
authorLennart Poettering <lennart@poettering.net>
Thu, 9 Sep 2021 09:18:47 +0000 (11:18 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 10 Sep 2021 12:15:41 +0000 (14:15 +0200)
src/shared/dissect-image.c

index 566c073c29a0469767ac68e2e43fcf30c73f8b7e..3279c843ecfc1481e9133c8aefb55fb6e851d0a3 100644 (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