From cec3948fd69a28cbf8c4f27dd9f63c6640eaf880 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 2 Jun 2021 01:22:41 +0100 Subject: [PATCH] otter cli: Suppress account selection for mgmtchannel-proxy Signed-off-by: Ian Jackson --- src/bin/otter.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bin/otter.rs b/src/bin/otter.rs index e106610a..2f040794 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -157,6 +157,7 @@ inventory::collect!(Subcommand); #[derive(Default,Debug)] pub struct SubcommandProperties { + suppress_selectaccount: bool, } pub struct SubCommandCallArgs { @@ -657,7 +658,9 @@ fn connect(ma: &MainOpts) -> Conn { if ma.superuser { chan.cmd(&MC::SetSuperuser(true))?; } - chan.cmd(&MC::SelectAccount(ma.account.clone()))?; + if ! ma.sc.props.suppress_selectaccount { + chan.cmd(&MC::SelectAccount(ma.account.clone()))?; + } chan } @@ -1982,6 +1985,7 @@ mod mgmtchannel_proxy { ordinary_subcmd!{ SSH_PROXY_SUBCMD, "connect to management channel and copy raw message data back and forth", + suppress_selectaccount: true, } } -- 2.30.2