diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-10-11 18:51:04 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-10-11 18:52:06 +0900 |
| commit | 037144b06e105bb51bdc5d4c451664c89442a7b4 (patch) | |
| tree | e82fc00cd5d2d5961313b39c19b43d44dbfd5c02 /internal | |
| parent | f5a597c4061b18b53e3124107c0e1434a98aedc9 (diff) | |
system/dbus: use well-known address in spec
The session bus still performs non-standard formatting since it makes no sense for hakurei to start the session bus.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/app/app_test.go | 10 | ||||
| -rw-r--r-- | internal/app/spdbus.go | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/internal/app/app_test.go b/internal/app/app_test.go index 8fbe0113..226b1b7e 100644 --- a/internal/app/app_test.go +++ b/internal/app/app_test.go @@ -250,7 +250,7 @@ func TestApp(t *testing.T) { Args: []string{"zsh", "-c", "exec chromium "}, Env: []string{ "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/65534/bus", - "DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket", + "DBUS_SYSTEM_BUS_ADDRESS=unix:path=/var/run/dbus/system_bus_socket", "HOME=/home/chronos", "PULSE_COOKIE=" + hst.PrivateTmp + "/pulse-cookie", "PULSE_SERVER=unix:/run/user/65534/pulse/native", @@ -284,7 +284,7 @@ func TestApp(t *testing.T) { Bind(m("/run/user/1971/hakurei/ebf083d1b175911782d413369b64ce7c/pulse"), m("/run/user/65534/pulse/native"), 0). Place(m(hst.PrivateTmp+"/pulse-cookie"), bytes.Repeat([]byte{0}, pulseCookieSizeMax)). Bind(m("/tmp/hakurei.0/ebf083d1b175911782d413369b64ce7c/bus"), m("/run/user/65534/bus"), 0). - Bind(m("/tmp/hakurei.0/ebf083d1b175911782d413369b64ce7c/system_bus_socket"), m("/run/dbus/system_bus_socket"), 0). + Bind(m("/tmp/hakurei.0/ebf083d1b175911782d413369b64ce7c/system_bus_socket"), m("/var/run/dbus/system_bus_socket"), 0). Remount(m("/"), syscall.MS_RDONLY), SeccompPresets: bits.PresetExt | bits.PresetDenyDevel, HostNet: true, @@ -394,7 +394,7 @@ func TestApp(t *testing.T) { Args: []string{"/nix/store/yqivzpzzn7z5x0lq9hmbzygh45d8rhqd-chromium-start"}, Env: []string{ "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1971/bus", - "DBUS_SYSTEM_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket", + "DBUS_SYSTEM_BUS_ADDRESS=unix:path=/var/run/dbus/system_bus_socket", "HOME=/var/lib/persist/module/hakurei/0/1", "PULSE_COOKIE=" + hst.PrivateTmp + "/pulse-cookie", "PULSE_SERVER=unix:/run/user/1971/pulse/native", @@ -434,7 +434,7 @@ func TestApp(t *testing.T) { Bind(m("/run/user/1971/hakurei/8e2c76b066dabe574cf073bdb46eb5c1/pulse"), m("/run/user/1971/pulse/native"), 0). Place(m(hst.PrivateTmp+"/pulse-cookie"), bytes.Repeat([]byte{0}, pulseCookieSizeMax)). Bind(m("/tmp/hakurei.0/8e2c76b066dabe574cf073bdb46eb5c1/bus"), m("/run/user/1971/bus"), 0). - Bind(m("/tmp/hakurei.0/8e2c76b066dabe574cf073bdb46eb5c1/system_bus_socket"), m("/run/dbus/system_bus_socket"), 0). + Bind(m("/tmp/hakurei.0/8e2c76b066dabe574cf073bdb46eb5c1/system_bus_socket"), m("/var/run/dbus/system_bus_socket"), 0). Remount(m("/"), syscall.MS_RDONLY), SeccompPresets: bits.PresetExt | bits.PresetDenyTTY | bits.PresetDenyDevel, HostNet: true, @@ -655,7 +655,7 @@ func (k *stubNixOS) evalSymlinks(path string) (string, error) { return "/run/user/1971", nil case "/tmp/hakurei.0": return "/tmp/hakurei.0", nil - case "/run/dbus": + case "/var/run/dbus": return "/run/dbus", nil case "/dev/kvm": return "/dev/kvm", nil diff --git a/internal/app/spdbus.go b/internal/app/spdbus.go index 604450a0..b818cbe9 100644 --- a/internal/app/spdbus.go +++ b/internal/app/spdbus.go @@ -50,7 +50,7 @@ func (s *spDBusOp) toContainer(state *outcomeStateParams) error { state.env["DBUS_SESSION_BUS_ADDRESS"] = "unix:path=" + sessionInner.String() state.params.Bind(state.instancePath().Append("bus"), sessionInner, 0) if s.ProxySystem { - systemInner := fhs.AbsRun.Append("dbus/system_bus_socket") + systemInner := fhs.AbsVar.Append("run/dbus/system_bus_socket") state.env["DBUS_SYSTEM_BUS_ADDRESS"] = "unix:path=" + systemInner.String() state.params.Bind(state.instancePath().Append("system_bus_socket"), systemInner, 0) } |
