From 9b507715d42f74c3f18fe817c2464abfca1b0182 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 8 Oct 2025 04:57:22 +0900 Subject: hst/dbus: validate interface strings This is relocated to hst to validate early. Signed-off-by: Ophestra --- hst/config_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'hst/config_test.go') diff --git a/hst/config_test.go b/hst/config_test.go index ea50d4f1..eba2b793 100644 --- a/hst/config_test.go +++ b/hst/config_test.go @@ -20,6 +20,10 @@ func TestConfigValidate(t *testing.T) { Msg: "identity -1 out of range"}}, {"identity upper", &hst.Config{Identity: 10000}, &hst.AppError{Step: "validate configuration", Err: hst.ErrIdentityBounds, Msg: "identity 10000 out of range"}}, + {"dbus session", &hst.Config{SessionBus: &hst.BusConfig{See: []string{""}}}, + &hst.BadInterfaceError{Interface: "", Segment: "session"}}, + {"dbus system", &hst.Config{SystemBus: &hst.BusConfig{See: []string{""}}}, + &hst.BadInterfaceError{Interface: "", Segment: "system"}}, {"container", &hst.Config{}, &hst.AppError{Step: "validate configuration", Err: hst.ErrConfigNull, Msg: "configuration missing container state"}}, {"home", &hst.Config{Container: &hst.ContainerConfig{}}, &hst.AppError{Step: "validate configuration", Err: hst.ErrConfigNull, -- cgit v1.3.1