From 9c71141a35bac534ab6d9ba8295681f81927e2c4 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 7 Jun 2021 14:53:28 +0100 Subject: [PATCH] ssh keys update: Test via the hardlink facility Signed-off-by: Ian Jackson --- apitest/at-otter.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apitest/at-otter.rs b/apitest/at-otter.rs index 7a422376..37299795 100644 --- a/apitest/at-otter.rs +++ b/apitest/at-otter.rs @@ -237,8 +237,9 @@ impl Ctx { self.otter(&set_keys).expect_err("auth keys has static"); - fs::rename(ds.subst("@authkeys@")?, - ds.subst("@authkeys@.static")?)?; + nix::unistd::linkat(None, &PathBuf::from( ds.subst("@authkeys@")? ), + None, &PathBuf::from( ds.subst("@authkeys@.static")? ), + nix::unistd::LinkatFlags::SymlinkFollow)?; self.otter(&set_keys)?; -- 2.30.2