diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-09-23 09:43:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-23 09:43:39 +0200 |
commit | 2d52f8c46c09c6ffad8987afdeea1532c02b8fc5 (patch) | |
tree | 141f0191b12e373727d4b3708e46a5e971edc516 | |
parent | Merge pull request #17127 from poettering/errno-fixup (diff) | |
parent | dissect-image: do not refuse verity GPT without /usr partition (diff) | |
download | systemd-2d52f8c46c09c6ffad8987afdeea1532c02b8fc5.tar.xz systemd-2d52f8c46c09c6ffad8987afdeea1532c02b8fc5.zip |
Merge pull request #17124 from bluca/copypasta
dissect-image: use correct path variable when reading verity signatures, do not refuse verity GPT without /usr partition
-rw-r--r-- | src/shared/dissect-image.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index e24740d449..3a2200f91e 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -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) { @@ -1964,7 +1964,7 @@ int verity_settings_load( if (!p) return -ENOMEM; - r = read_full_file_full(AT_FDCWD, root_hash_sig_path, 0, (char**) &root_hash_sig, &root_hash_sig_size); + r = read_full_file_full(AT_FDCWD, p, 0, (char**) &root_hash_sig, &root_hash_sig_size); if (r < 0 && r != -ENOENT) return r; if (r >= 0) @@ -1978,7 +1978,7 @@ int verity_settings_load( if (!p) return -ENOMEM; - r = read_full_file_full(AT_FDCWD, root_hash_sig_path, 0, (char**) &root_hash_sig, &root_hash_sig_size); + r = read_full_file_full(AT_FDCWD, p, 0, (char**) &root_hash_sig, &root_hash_sig_size); if (r < 0 && r != -ENOENT) return r; if (r >= 0) |