diff --git a/libcitadel/src/verity.rs b/libcitadel/src/verity.rs index bf9e611..d9c6aaf 100644 --- a/libcitadel/src/verity.rs +++ b/libcitadel/src/verity.rs @@ -12,11 +12,13 @@ const LOSETUP: &str = "/sbin/losetup"; /// Parse output from veritysetup command and return as `VerityOutput`. pub fn generate_initial_hashtree, Q:AsRef>(source: P, hashtree: Q) -> Result { let args = format!("format {} {}", source.as_ref().display(), hashtree.as_ref().display()); - let output = util::exec_cmdline_with_output(VERITYSETUP, args) + // Don't use absolute path to veritysetup so that the build will correctly find the version from cryptsetup-native + let output = util::exec_cmdline_with_output("veritysetup", args) .context("creating initial hashtree with veritysetup format failed")?; Ok(VerityOutput::parse(&output)) } + pub fn generate_image_hashtree>(image: P, metainfo: &MetaInfo) -> Result { let args = format!("--hash-offset={} --data-blocks={} --salt={} format {} {}", metainfo.nblocks() * 4096, metainfo.nblocks(), metainfo.verity_salt(),