]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
machinectl: do not escape the unit name (#3554)
authorElias Probst <mail@eliasprobst.eu>
Wed, 22 Jun 2016 15:10:52 +0000 (17:10 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 22 Jun 2016 15:10:52 +0000 (17:10 +0200)
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

index 583d2a21e7afa663700e7196be8e8832ca75356f..5ca557abbff3fc888c92f706767bfb6e9bf80145 100644 (file)
@@ -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");