diff options
author | Kai Lueke <kailuke@microsoft.com> | 2022-08-15 17:47:03 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-09-06 03:53:03 +0900 |
commit | e374439f4b8def786031ddbbd7dfdae3a335d4d2 (patch) | |
tree | 089d33e5a530f30f129f06f34defe107e6f3e73c /src/gpt-auto-generator | |
parent | 6f2cea06bfce6ad99f0ac37ab12af61ef7549fe3 (diff) | |
download | systemd-e374439f4b8def786031ddbbd7dfdae3a335d4d2.tar.gz |
Use original filename for extension name check
The loading of an extension image from a symlink "NAME.raw" to
"NAME-VERSION.raw" failed because the release file name check worked
with the backing file of the loop device which already resolves the
symlink and thus the found name "NAME-VERSION" mismatched "NAME".
Pass the original filename and use it instead of the backing file
when available. This fixes the loading of "NAME.raw" extensions which
are a symlink to "NAME-VERSION.raw" as, e.g., may be the case when
systemd-sysupdate manages multiple versions.
Fixes https://github.com/systemd/systemd/issues/24293
Diffstat (limited to 'src/gpt-auto-generator')
-rw-r--r-- | src/gpt-auto-generator/gpt-auto-generator.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index bd16ae333c..baa72e77ba 100644 --- a/src/gpt-auto-generator/gpt-auto-generator.c +++ b/src/gpt-auto-generator/gpt-auto-generator.c @@ -710,6 +710,7 @@ static int enumerate_partitions(dev_t devnum) { r = dissect_image( fd, + NULL, NULL, NULL, /* diskseq= */ 0, UINT64_MAX, |