cryptroot hook does not handle quotes in fstab
Bug #784203 reported by
xenoson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cryptsetup (Ubuntu) |
Triaged
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: cryptsetup
Hello!
It seems all the utils handle UUID="" and LABEL="" statements in fstab with quotes like blkid prints them.
While chasing a missing conf/conf.
[ -h "$dev" ] fails on something like "/dev/disk/
tags: | added: patch |
Changed in cryptsetup (Ubuntu): | |
status: | Expired → Triaged |
To post a comment you must log in.
Thanks for the patch!
@@ -181,11 +181,16 @@
key=$( echo $opt | cut -d " " -f3 )
rootopts=$( echo $opt | cut -d " " -f4- )
- if [ -z "$opt" ] || [ -z "$source" ] || [ -z "$key" ] || [ -z "$rootopts" ]; then
- echo "cryptsetup: WARNING: invalid line in /etc/crypttab - $opt" >&2
+ if [ -z "$opt" ]; then
+ echo "cryptsetup: INFO: mapped volume $target has no line in /etc/crypttab" >&2
return 1
fi
+ if [ -z "$source" ] || [ -z "$key" ] || [ -z "$rootopts" ]; then
+ echo "cryptsetup: WARNING: invalid line in /etc/crypttab - $opt" >&2
+ return 1
+ fi
+
# Sanity checks for $source
if [ -h "$source" ]; then
link=$(readlink -nqe "$source")
This seems unrelated to the present bug report. Isn't only the change to canonical_dev needed?
Can you provide an example of a tool that handles quotes in /etc/fstab as you describe, that I can check this behavior against?