Skip to content

Commit

Permalink
crypt: escape backslashes for systemd unit names b/c udev/initqueue/bash
Browse files Browse the repository at this point in the history
otherwise
luks\x2d25e41d19\x2d1580\x2d4e7c\x2d8875\x2d134045008f33
turns to
luksx2d25e41d19x2d1580x2d4e7cx2d8875x2d134045008f33
  • Loading branch information
haraldh committed Jan 11, 2018
1 parent 5a8efed commit 0f6d93e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules.d/90crypt/parse-crypt.sh
Expand Up @@ -64,6 +64,8 @@ else
} >> /etc/udev/rules.d/70-luks.rules.new
else
luksname=$(dev_unit_name "$luksname")
luksname="$(str_replace "$luksname" '\' '\\')"

if ! crypttab_contains "$serialid"; then
{
printf -- 'ENV{ID_SERIAL_SHORT}=="*%s*", ' "$serialid"
Expand Down Expand Up @@ -95,6 +97,8 @@ else
} >> /etc/udev/rules.d/70-luks.rules.new
else
luksname=$(dev_unit_name "$luksname")
luksname="$(str_replace "$luksname" '\' '\\')"

if ! crypttab_contains "$luksid"; then
{
printf -- 'ENV{ID_FS_TYPE}=="crypto_LUKS", '
Expand Down

0 comments on commit 0f6d93e

Please sign in to comment.