shared/install: Preserve escape characters for escaped unit names
authorDavid Michael <dm0@redhat.com>
Wed, 20 Mar 2019 15:14:32 +0000 (15:14 +0000)
committerThe Plumber <50238977+systemd-rhel-bot@users.noreply.github.com>
Tue, 22 Jun 2021 12:28:05 +0000 (14:28 +0200)
commit91ed691ff73d4d71fae8f6896a1bba73e6a76bba
tree0d551fc44a527d46e29495e9a23f0316f214a7c9
parent354b894aa3e79f54ab75bf6fae76ce28ca80db38
shared/install: Preserve escape characters for escaped unit names

Since switching to extract_first_word with no flags for parsing
unit names in 4c9565eea534cd233a913c8c21f7920dba229743, escape
characters will be stripped from escaped unit names such as
"mnt-persistent\x2dvolume.mount" resulting in the unit not being
configured as defined.  Preserve escape characters again for
compatibility with existing preset definitions.

(cherry picked from commit 82bd4da71e9cdd5a2e9266332f5a7399845e31f6)

Resolves: #1952686
src/shared/install.c