]> git.ipfire.org Git - thirdparty/systemd.git/commit
Use original filename for extension name check
authorKai Lueke <kailuke@microsoft.com>
Mon, 15 Aug 2022 15:47:03 +0000 (17:47 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 5 Sep 2022 18:53:03 +0000 (03:53 +0900)
commite374439f4b8def786031ddbbd7dfdae3a335d4d2
tree089d33e5a530f30f129f06f34defe107e6f3e73c
parent6f2cea06bfce6ad99f0ac37ab12af61ef7549fe3
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
src/core/namespace.c
src/gpt-auto-generator/gpt-auto-generator.c
src/portable/portable.c
src/shared/discover-image.c
src/shared/dissect-image.c
src/shared/dissect-image.h
src/test/test-loop-block.c
test/units/testsuite-50.sh