-
Notifications
You must be signed in to change notification settings - Fork 321
Closed
Description
Repro steps
- Create a new instance of go-systemd's dbus.Conn
- Call GetUnitInfo with a dbus path containing unsupported characters
Result:
The process will hang
Expected:
Return an error telling me I've asked to do the impossible
Here's a script to illustrate the problem:
package main
import (
systemdDbus "github.com/coreos/go-systemd/dbus"
"github.com/guelfey/go.dbus"
"os"
)
func main() {
systemd := systemdDbus.New()
path := dbus.ObjectPath(os.Args[1])
info, _ := systemd.GetUnitInfo(path)
println(info["ActiveState"].Value().(string))
}
Build this and run something like
./test ./test /org/freedesktop/systemd1/unit/ping.service
vs.
./test /org/freedesktop/systemd1/unit/ping_2eservice
This describes valid dbus paths: http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-marshaling-object-path
This should illustrate what encoding systemd expects: http://cgit.freedesktop.org/systemd/systemd/tree/src/shared/util.c#n1360
Metadata
Metadata
Assignees
Labels
No labels