|
|
b677e7 |
From 91ed691ff73d4d71fae8f6896a1bba73e6a76bba Mon Sep 17 00:00:00 2001
|
|
|
b677e7 |
From: David Michael <dm0@redhat.com>
|
|
|
b677e7 |
Date: Wed, 20 Mar 2019 15:14:32 +0000
|
|
|
b677e7 |
Subject: [PATCH] shared/install: Preserve escape characters for escaped unit
|
|
|
b677e7 |
names
|
|
|
b677e7 |
|
|
|
b677e7 |
Since switching to extract_first_word with no flags for parsing
|
|
|
b677e7 |
unit names in 4c9565eea534cd233a913c8c21f7920dba229743, escape
|
|
|
b677e7 |
characters will be stripped from escaped unit names such as
|
|
|
b677e7 |
"mnt-persistent\x2dvolume.mount" resulting in the unit not being
|
|
|
b677e7 |
configured as defined. Preserve escape characters again for
|
|
|
b677e7 |
compatibility with existing preset definitions.
|
|
|
b677e7 |
|
|
|
b677e7 |
(cherry picked from commit 82bd4da71e9cdd5a2e9266332f5a7399845e31f6)
|
|
|
b677e7 |
|
|
|
b677e7 |
Resolves: #1952686
|
|
|
b677e7 |
---
|
|
|
b677e7 |
src/shared/install.c | 2 +-
|
|
|
b677e7 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
b677e7 |
|
|
|
b677e7 |
diff --git a/src/shared/install.c b/src/shared/install.c
|
|
|
b677e7 |
index c2847df3f8..c9fef6bde2 100644
|
|
|
b677e7 |
--- a/src/shared/install.c
|
|
|
b677e7 |
+++ b/src/shared/install.c
|
|
|
b677e7 |
@@ -2774,7 +2774,7 @@ static int split_pattern_into_name_and_instances(const char *pattern, char **out
|
|
|
b677e7 |
assert(out_instances);
|
|
|
b677e7 |
assert(out_unit_name);
|
|
|
b677e7 |
|
|
|
b677e7 |
- r = extract_first_word(&pattern, &unit_name, NULL, 0);
|
|
|
b677e7 |
+ r = extract_first_word(&pattern, &unit_name, NULL, EXTRACT_RETAIN_ESCAPE);
|
|
|
b677e7 |
if (r < 0)
|
|
|
b677e7 |
return r;
|
|
|
b677e7 |
|