From: Anita Zhang Date: Thu, 4 Mar 2021 01:25:40 +0000 (-0800) Subject: run: update dbus unique names check X-Git-Tag: v248-rc3~68 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=01584bf9e43db1dfb7ea4ba628f533b3066e81cc;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/run/run.c b/src/run/run.c index 11166d2e78b..8c036857cf2 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -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.",