arti-bench: Disable all fs permissions (fs-mistrust) checks

This is a benchmarking tool, and fs-mistrust doesn't like the
permissions in our CI.  The env var ARTI_FS_DISABLE_PERMISSION_CHECKS
is (of course) specific to arti.  Maybe it should be honoured here,
or this should be done via the config files.

But disabling this is fine for now.
This commit is contained in:
Ian Jackson 2022-05-12 16:36:28 +01:00
parent f0eac61838
commit 58c753429f
3 changed files with 9 additions and 0 deletions

1
Cargo.lock generated
View File

@ -113,6 +113,7 @@ dependencies = [
"arti-config", "arti-config",
"clap", "clap",
"float-ord", "float-ord",
"fs-mistrust",
"futures", "futures",
"rand 0.8.5", "rand 0.8.5",
"serde", "serde",

View File

@ -26,4 +26,5 @@ tor-rtcompat = { path = "../tor-rtcompat", version = "0.3.0", features = ["tokio
arti = { path = "../arti", version = "0.3.0"} arti = { path = "../arti", version = "0.3.0"}
arti-config = { path = "../arti-config", version = "0.3.0"} arti-config = { path = "../arti-config", version = "0.3.0"}
arti-client = { package = "arti-client", path = "../arti-client", version = "0.3.0"} arti-client = { package = "arti-client", path = "../arti-client", version = "0.3.0"}
fs-mistrust = { path = "../fs-mistrust", version = "0.1.0" }
tokio-socks = "0.5" tokio-socks = "0.5"

View File

@ -359,6 +359,13 @@ fn main() -> Result<()> {
.values_of_os("arti-config") .values_of_os("arti-config")
.unwrap_or_default() .unwrap_or_default()
.for_each(|f| config_sources.push_file(f)); .for_each(|f| config_sources.push_file(f));
// TODO really we ought to get this from the arti configuration, or something.
// But this is OK for now since we are a benchmarking tool.
let mut mistrust = fs_mistrust::Mistrust::new();
mistrust.dangerously_trust_everyone();
config_sources.set_mistrust(mistrust);
let cfg = config_sources.load()?; let cfg = config_sources.load()?;
let config: ArtiConfig = cfg.try_into()?; let config: ArtiConfig = cfg.try_into()?;
let tcc = config.tor_client_config()?; let tcc = config.tor_client_config()?;