summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElias Probst <mail@eliasprobst.eu>2016-06-22 17:10:52 +0200
committerLennart Poettering <lennart@poettering.net>2016-06-22 17:10:52 +0200
commit1e9707d495ca52f23dff4d0eb16a1c2346a0f34e (patch)
tree79934313d4f53837686663f72bd838c1a33d08ec /src
parent2787d83c28b7565ea6f80737170514e5e6186917 (diff)
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`.
Diffstat (limited to 'src')
-rw-r--r--src/machine/machinectl.c6
1 files changed, 1 insertions, 5 deletions
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");