From 1e9707d495ca52f23dff4d0eb16a1c2346a0f34e Mon Sep 17 00:00:00 2001 From: Elias Probst Date: Wed, 22 Jun 2016 17:10:52 +0200 Subject: machinectl: do not escape the unit name (#3554) Otherwise starting a machine named `foo-bar-baz` will end up in machinectl attempting to start the service unit `systemd-nspawn@foo\x2dbar\x2dbaz` instead of `systemd-nspawn@foo-bar-baz`. --- src/machine/machinectl.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/machine/machinectl.c') diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c index 583d2a21e7..5ca557abbf 100644 --- a/src/machine/machinectl.c +++ b/src/machine/machinectl.c @@ -1535,11 +1535,7 @@ static int make_service_name(const char *name, char **ret) { return -EINVAL; } - e = unit_name_escape(name); - if (!e) - return log_oom(); - - r = unit_name_build("systemd-nspawn", e, ".service", ret); + r = unit_name_build("systemd-nspawn", name, ".service", ret); if (r < 0) return log_error_errno(r, "Failed to build unit name: %m"); -- cgit v1.2.3-54-g00ecf