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.
This commit is contained in:
committed by
Luca Boccassi
parent
1e582ede3b
commit
cedf5b1aef
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user