From fff194caf7abb4bdfc131c88b70fe1a05f73d8e4 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 29 May 2021 22:56:35 +0100 Subject: [PATCH] cmdlistener: Make space AuthState::Ssh variant Signed-off-by: Ian Jackson --- daemon/cmdlistener.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/daemon/cmdlistener.rs b/daemon/cmdlistener.rs index 377dda94..e7a712ef 100644 --- a/daemon/cmdlistener.rs +++ b/daemon/cmdlistener.rs @@ -1730,7 +1730,10 @@ fn authorise_scope_direct(cs: &CommandStreamData, ag: &AccountsGuard, fn do_authorise_scope(cs: &CommandStreamData, _ag: &AccountsGuard, wanted: &AccountScope) -> Authorisation { - if let Some(y) = cs.is_superuser() { return y } + match &cs.authstate { + &AuthState::Superuser { auth, .. } => return auth.into(), + _ => {}, + } match &wanted { -- 2.30.2