From: Elias Probst Date: Wed, 22 Jun 2016 15:10:52 +0000 (+0200) Subject: machinectl: do not escape the unit name (#3554) X-Git-Tag: v231~133 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1e9707d495ca52f23dff4d0eb16a1c2346a0f34e;p=thirdparty%2Fsystemd.git 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`. --- diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c index 583d2a21e7a..5ca557abbff 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");