aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/spdbus.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-14 01:33:44 +0900
committerOphestra <cat@gensokyo.uk>2025-10-14 01:33:44 +0900
commit790d77075e40ee3162d7925e983f01747b5c2c89 (patch)
tree56a59641aa87a40c9b28600ff8bd5d5642d95f5e /internal/app/spdbus.go
parente5ff40e7d32d28cace183cd2c80f40f142855ff5 (diff)
system/dbus: remove builder state leak
This enables external testing of system.I state. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/spdbus.go')
-rw-r--r--internal/app/spdbus.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/internal/app/spdbus.go b/internal/app/spdbus.go
index b818cbe9..c2c1fefe 100644
--- a/internal/app/spdbus.go
+++ b/internal/app/spdbus.go
@@ -13,8 +13,7 @@ func init() { gob.Register(new(spDBusOp)) }
// spDBusOp maintains an xdg-dbus-proxy instance for the container.
type spDBusOp struct {
- // Whether to bind the system bus socket.
- // Populated during toSystem.
+ // Whether to bind the system bus socket. Populated during toSystem.
ProxySystem bool
}
@@ -30,10 +29,10 @@ func (s *spDBusOp) toSystem(state *outcomeStateSys) error {
// downstream socket paths
sessionPath, systemPath := state.instance().Append("bus"), state.instance().Append("system_bus_socket")
- if err := state.sys.ProxyDBus(
- state.sessionBus, state.systemBus,
- sessionPath, systemPath,
- ); err != nil {
+ var sessionBus, systemBus dbus.ProxyPair
+ sessionBus[0], systemBus[0] = state.k.dbusAddress()
+ sessionBus[1], systemBus[1] = sessionPath.String(), systemPath.String()
+ if err := state.sys.ProxyDBus(state.sessionBus, state.systemBus, sessionBus, systemBus); err != nil {
return err
}