systemd: Escape only needed characters for machined

Machine name escaping follows the same rules as serice name escape,
except that '.' and '-' must not be escaped in machine names, due
to a bug in systemd-machined.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1282846

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander
2015-11-27 16:39:46 +01:00
parent baa3b463b3
commit 0e0149ce91
2 changed files with 18 additions and 9 deletions
+2 -2
View File
@@ -517,9 +517,9 @@ mymain(void)
} while (0)
TEST_MACHINE("demo", "qemu-demo");
TEST_MACHINE("demo-name", "qemu-demo\\x2dname");
TEST_MACHINE("demo-name", "qemu-demo-name");
TEST_MACHINE("demo!name", "qemu-demo\\x21name");
TEST_MACHINE(".demo", "qemu-\\x2edemo");
TEST_MACHINE(".demo", "qemu-.demo");
TEST_MACHINE("bull\U0001f4a9", "qemu-bull\\xf0\\x9f\\x92\\xa9");
# define TESTS_PM_SUPPORT_HELPER(name, function) \