From 22ee5ae151fa991cf23dbf1b3efb5a0d6fb9b092 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 10 Oct 2025 02:23:34 +0900 Subject: internal/app: filter ops in implementation This is cleaner and less error-prone, and should also result in negligibly less memory allocation. Signed-off-by: Ophestra --- internal/app/spdbus.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'internal/app/spdbus.go') diff --git a/internal/app/spdbus.go b/internal/app/spdbus.go index 0d26d997..ac27eeb0 100644 --- a/internal/app/spdbus.go +++ b/internal/app/spdbus.go @@ -4,6 +4,7 @@ import ( "encoding/gob" "hakurei.app/container/fhs" + "hakurei.app/hst" "hakurei.app/system/acl" "hakurei.app/system/dbus" ) @@ -18,6 +19,10 @@ type spDBusOp struct { } func (s *spDBusOp) toSystem(state *outcomeStateSys) error { + if state.config.Enablements.Unwrap()&hst.EDBus == 0 { + return errNotEnabled + } + if state.config.SessionBus == nil { state.config.SessionBus = dbus.NewConfig(state.config.ID, true, true) } -- cgit v1.3.1