internal/app/spcontainer: resolve path through dispatcher
All checks were successful
Test / Create distribution (push) Successful in 36s
Test / Sandbox (push) Successful in 2m13s
Test / Hpkg (push) Successful in 4m2s
Test / Hakurei (race detector) (push) Successful in 5m23s
Test / Hakurei (push) Successful in 2m14s
Test / Sandbox (race detector) (push) Successful in 2m7s
Test / Flake checks (push) Successful in 1m32s
All checks were successful
Test / Create distribution (push) Successful in 36s
Test / Sandbox (push) Successful in 2m13s
Test / Hpkg (push) Successful in 4m2s
Test / Hakurei (race detector) (push) Successful in 5m23s
Test / Hakurei (push) Successful in 2m14s
Test / Sandbox (race detector) (push) Successful in 2m7s
Test / Flake checks (push) Successful in 1m32s
This prevents state from os tainting the test data. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
037144b06e
commit
36f312b3ba
@ -581,6 +581,8 @@ func (k *stubNixOS) lookupEnv(key string) (string, bool) {
|
|||||||
return "/run/user/1971", true
|
return "/run/user/1971", true
|
||||||
case "XDG_CONFIG_HOME":
|
case "XDG_CONFIG_HOME":
|
||||||
return "/home/ophestra/xdg/config", true
|
return "/home/ophestra/xdg/config", true
|
||||||
|
case "DBUS_SYSTEM_BUS_ADDRESS":
|
||||||
|
return "", false
|
||||||
default:
|
default:
|
||||||
panic(fmt.Sprintf("attempted to access unexpected environment variable %q", key))
|
panic(fmt.Sprintf("attempted to access unexpected environment variable %q", key))
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,12 @@ func (s *spFilesystemOp) toSystem(state *outcomeStateSys) error {
|
|||||||
varRunNscd,
|
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 {
|
if entries, err := dbus.Parse([]byte(systemBusAddr)); err != nil {
|
||||||
return &hst.AppError{Step: "parse dbus address", Err: err}
|
return &hst.AppError{Step: "parse dbus address", Err: err}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user