From: Ian Jackson Date: Wed, 2 Jun 2021 17:05:59 +0000 (+0100) Subject: sshkeys: Tests restricted command branch sawing X-Git-Tag: otter-0.7.0~94 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=33386a656d9bdd74f286b34f50d9592725ab1dc1;p=otter.git sshkeys: Tests restricted command branch sawing Signed-off-by: Ian Jackson --- diff --git a/apitest/at-otter.rs b/apitest/at-otter.rs index 6d826e85..a4f68041 100644 --- a/apitest/at-otter.rs +++ b/apitest/at-otter.rs @@ -266,6 +266,13 @@ impl Ctx { self.otter(&mk_restricted("ssh:other:", "list-accounts")?) .expect_err("unath"); self.otter(&mk_restricted("ssh:test:", "list-accounts")?)?; + + self.otter(&mk_restricted( + "ssh:test:", "set-ssh-keys /dev/null")?).expect_err("saw own branch"); + self.otter(&mk_restricted( + "ssh:test:", "set-ssh-keys --allow-remove-current /dev/null")?)?; + self.otter(&mk_restricted("ssh:test:sub", "list-accounts")?) + .expect_err("sawn off"); } }