summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2022-04-06 18:25:35 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2022-04-07 18:31:04 +0200
commitcedf5b1aef4da2443f00eef2c242c8b005071aca (patch)
tree519a992b7d3ad13df2ac98b968238d8829552053 /src/core
parentcalendarspec: fix possibly skips next elapse (diff)
downloadsystemd-cedf5b1aef4da2443f00eef2c242c8b005071aca.tar.xz
systemd-cedf5b1aef4da2443f00eef2c242c8b005071aca.zip
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.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/namespace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/namespace.c b/src/core/namespace.c
index 4ede17788b..e6aa7b6473 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
@@ -1216,7 +1216,7 @@ static int mount_image(const MountEntry *m, const char *root_directory) {
}
r = verity_dissect_and_mount(
- mount_entry_source(m), mount_entry_path(m), m->image_options,
+ /* src_fd= */ -1, mount_entry_source(m), mount_entry_path(m), m->image_options,
host_os_release_id, host_os_release_version_id, host_os_release_sysext_level, NULL);
if (r == -ENOENT && m->ignore)
return 0;