Skip to content

Commit 01584bf

Browse files
anitazhabluca
authored andcommitted
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.
1 parent da46a1b commit 01584bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/run/run.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ static int make_unit_name(sd_bus *bus, UnitType t, char **ret) {
959959
/* We managed to get the unique name, then let's use that to
960960
* name our transient units. */
961961

962-
id = startswith(unique, ":1.");
962+
id = startswith(unique, ":");
963963
if (!id)
964964
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
965965
"Unique name %s has unexpected format.",

0 commit comments

Comments
 (0)