core: fix dm-verity auto-discovery in MountImageUnit()
authorLuca Boccassi <bluca@debian.org>
Wed, 6 Apr 2022 16:25:35 +0000 (17:25 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 7 Apr 2022 16:31:04 +0000 (17:31 +0100)
commitcedf5b1aef4da2443f00eef2c242c8b005071aca
tree519a992b7d3ad13df2ac98b968238d8829552053
parent1e582ede3b04d12aae11fc5378a446a392054f1c
core: fix dm-verity auto-discovery in MountImageUnit()

The implementation of MountImageUnit()/systemctl mount-image was
changed to use a /proc/self/fd path as the source, but that causes
the dm-verity files autodiscovery to fail, as it looks for files
in the same directory as the image.

Use the original file path when setting up dm-verity.
src/core/namespace.c
src/shared/dissect-image.c
src/shared/dissect-image.h
src/shared/mount-util.c
test/units/testsuite-50.sh