From 14f0d053e95a11de6224a20ef2bb3ba00a720071 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 30 May 2021 12:52:32 +0100 Subject: [PATCH] sshkeys: Notes about checking for non-ssh: accounts Signed-off-by: Ian Jackson --- src/bin/otter.rs | 2 ++ src/sshkeys.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/bin/otter.rs b/src/bin/otter.rs index 67f57aa1..c3f2e94d 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -4,6 +4,8 @@ #![allow(unused_imports)] +// xxx ssh keys: need a force option to set key for non ssh: account + use otter::imports::*; use std::cell::Cell; diff --git a/src/sshkeys.rs b/src/sshkeys.rs index 05949a87..68f1ebcf 100644 --- a/src/sshkeys.rs +++ b/src/sshkeys.rs @@ -182,6 +182,10 @@ macro_rules! def_pskeys_get { if ! record.account.subaccount.is_empty() { throw!(ME::NoSshKeysForSubaccount) } + // We do *not* check that the account is of scope kind Ssh. + // Installing ssh keys for other scopes is fine. + // otter(1) will check this. + & $($mut)? record.ssh_keys } } -- 2.30.2