aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/spcontainer.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-11 20:15:53 +0900
committerOphestra <cat@gensokyo.uk>2025-10-11 20:20:41 +0900
commit36f312b3ba45f1bec6341b4f66a1f2e89971bc51 (patch)
treec1cba9a1a4bdee5a4c06d4a64fc9709a913d3c03 /internal/app/spcontainer.go
parent037144b06e105bb51bdc5d4c451664c89442a7b4 (diff)
internal/app/spcontainer: resolve path through dispatcher
This prevents state from os tainting the test data. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/spcontainer.go')
-rw-r--r--internal/app/spcontainer.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/app/spcontainer.go b/internal/app/spcontainer.go
index 62c4f4f7..247b7983 100644
--- a/internal/app/spcontainer.go
+++ b/internal/app/spcontainer.go
@@ -139,7 +139,12 @@ func (s *spFilesystemOp) toSystem(state *outcomeStateSys) error {
varRunNscd,
}
- _, systemBusAddr := dbus.Address()
+ // dbus.Address does not go through syscallDispatcher
+ systemBusAddr := dbus.FallbackSystemBusAddress
+ if addr, ok := state.k.lookupEnv(dbus.SystemBusAddress); ok {
+ systemBusAddr = addr
+ }
+
if entries, err := dbus.Parse([]byte(systemBusAddr)); err != nil {
return &hst.AppError{Step: "parse dbus address", Err: err}
} else {