]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dissect: fix root hash signature autodiscovery
authorLuca Boccassi <bluca@debian.org>
Sun, 10 Jan 2021 15:06:04 +0000 (15:06 +0000)
committerLennart Poettering <lennart@poettering.net>
Sun, 10 Jan 2021 20:57:38 +0000 (21:57 +0100)
The root hash signature is auto discovered only if the root hash was specified
manually. Ensure that an auto discovered root hash is also enough.

src/shared/dissect-image.c

index bfde5cd5a0122b9fbc6a57e440b64fc6f30cfcae..f2634139f76d97dd4850534a1e0ca3ce529ade36 100644 (file)
@@ -2123,7 +2123,7 @@ int verity_settings_load(
                 }
         }
 
-        if (verity->root_hash && !verity->root_hash_sig) {
+        if ((root_hash || verity->root_hash) && !verity->root_hash_sig) {
                 if (root_hash_sig_path) {
                         r = read_full_file(root_hash_sig_path, (char**) &root_hash_sig, &root_hash_sig_size);
                         if (r < 0 && r != -ENOENT)