]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dissect-image: do not refuse verity GPT without /usr partition 17124/head
authorLuca Boccassi <luca.boccassi@microsoft.com>
Tue, 22 Sep 2020 14:24:59 +0000 (15:24 +0100)
committerLuca Boccassi <luca.boccassi@microsoft.com>
Tue, 22 Sep 2020 14:24:59 +0000 (15:24 +0100)
Only enforce that /usr verity partition is present if a /usr
partition is there

src/shared/dissect-image.c

index 8947da810249b6dd3e3f25bd49b638c4d60e9e38..3a2200f91e735db5c3978256a9b03d8e8f75482c 100644 (file)
@@ -956,7 +956,7 @@ int dissect_image(
                 return -EADDRNOTAVAIL;
 
         /* Combinations of verity /usr with verity-less root is OK, but the reverse is not */
-        if (m->partitions[PARTITION_ROOT_VERITY].found && !m->partitions[PARTITION_USR_VERITY].found)
+        if (m->partitions[PARTITION_ROOT_VERITY].found && m->partitions[PARTITION_USR].found && !m->partitions[PARTITION_USR_VERITY].found)
                 return -EADDRNOTAVAIL;
 
         if (verity && verity->root_hash) {