From e374439f4b8def786031ddbbd7dfdae3a335d4d2 Mon Sep 17 00:00:00 2001 From: Kai Lueke Date: Mon, 15 Aug 2022 17:47:03 +0200 Subject: 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/gpt-auto-generator/gpt-auto-generator.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gpt-auto-generator') 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, -- cgit v1.2.1