1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-12 09:17:44 +03:00

run: update dbus unique names check

Some code in systemd-run checks that a bus's unique name must start with
`:1.`. However the dbus specification on unique connection names only specifies
that it must begin with a colon. And the freedesktop/dbus implementation allows
allows unique names to go up to `:INT_MAX.INT_MAX`. So update the
current check to only look for a colon at the beginning.
This commit is contained in:
Anita Zhang 2021-03-03 17:25:40 -08:00 committed by Luca Boccassi
parent da46a1bc3c
commit 01584bf9e4

View File

@ -959,7 +959,7 @@ static int make_unit_name(sd_bus *bus, UnitType t, char **ret) {
/* We managed to get the unique name, then let's use that to
* name our transient units. */
id = startswith(unique, ":1.");
id = startswith(unique, ":");
if (!id)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"Unique name %s has unexpected format.",