From: Ian Jackson Date: Tue, 1 Jun 2021 20:50:47 +0000 (+0100) Subject: sshkeys: Do not include filename in context X-Git-Tag: otter-0.7.0~125 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=913207ed549f2f43190e7d851b25be4c5da28d91;p=otter.git sshkeys: Do not include filename in context This gets printed when we log the AuthKeysManipError. Signed-off-by: Ian Jackson --- diff --git a/src/sshkeys.rs b/src/sshkeys.rs index ebff7b91..30b7693d 100644 --- a/src/sshkeys.rs +++ b/src/sshkeys.rs @@ -482,14 +482,13 @@ impl Global { } Ok::<_,AE>(()) })() - .with_context(|| path.clone()) .context("check authorized_keys magic/banner")?; let mut f = fs::OpenOptions::new() .write(true).truncate(true).create(true) .mode(0o644) .open(&tmp) - .with_context(|| tmp.clone()).context("open new auth keys file")?; + .context("open new auth keys file (.tmp)")?; let include = &config.authorized_keys_include; @@ -500,7 +499,7 @@ impl Global { include)?; f.flush()?; Ok::<_,io::Error>(()) - })().with_context(|| tmp.clone()).context("write header")?; + })().context("write header (to .tmp)")?; if let Some(mut sf) = match File::open(include) { Ok(y) => Some(y),