diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-10 01:20:16 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-10 01:21:01 +0900 |
| commit | 4246256d781f169b86f76d8654f6df5ffc6ddae6 (patch) | |
| tree | 71f05518ff960873661788c3dcf581eed314322b /internal/app/spdbus.go | |
| parent | a941ac025f9f3a942cab04a6f2447e4cab0e616c (diff) | |
internal/app: hold config address in state
This can be removed eventually as it is barely used.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/spdbus.go')
| -rw-r--r-- | internal/app/spdbus.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/internal/app/spdbus.go b/internal/app/spdbus.go index 81e05957..0d26d997 100644 --- a/internal/app/spdbus.go +++ b/internal/app/spdbus.go @@ -4,7 +4,6 @@ import ( "encoding/gob" "hakurei.app/container/fhs" - "hakurei.app/hst" "hakurei.app/system/acl" "hakurei.app/system/dbus" ) @@ -18,23 +17,23 @@ type spDBusOp struct { ProxySystem bool } -func (s *spDBusOp) toSystem(state *outcomeStateSys, config *hst.Config) error { - if config.SessionBus == nil { - config.SessionBus = dbus.NewConfig(config.ID, true, true) +func (s *spDBusOp) toSystem(state *outcomeStateSys) error { + if state.config.SessionBus == nil { + state.config.SessionBus = dbus.NewConfig(state.config.ID, true, true) } // downstream socket paths sessionPath, systemPath := state.instance().Append("bus"), state.instance().Append("system_bus_socket") if err := state.sys.ProxyDBus( - config.SessionBus, config.SystemBus, + state.config.SessionBus, state.config.SystemBus, sessionPath, systemPath, ); err != nil { return err } state.sys.UpdatePerm(sessionPath, acl.Read, acl.Write) - if config.SystemBus != nil { + if state.config.SystemBus != nil { s.ProxySystem = true state.sys.UpdatePerm(systemPath, acl.Read, acl.Write) } |
