diff options
author | Anita Zhang <the.anitazha@gmail.com> | 2021-03-03 17:25:40 -0800 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2021-03-04 09:52:13 +0000 |
commit | 01584bf9e43db1dfb7ea4ba628f533b3066e81cc (patch) | |
tree | 793615fdf974cb50c2a6cb29dc1d06e3434e941f | |
parent | da46a1bc3cd28ac36114002c216196dae004b05c (diff) | |
download | systemd-01584bf9e43db1dfb7ea4ba628f533b3066e81cc.tar.gz |
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.
-rw-r--r-- | src/run/run.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/run/run.c b/src/run/run.c index 11166d2e78..8c036857cf 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.", |