cryptdisks.functions ignores crypttab entries

Bug #126851 reported by moritz
2
Affects Status Importance Assigned to Milestone
cryptsetup (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

Binary package hint: cryptsetup

My /etc/crypttab contains this line:

crypt /dev/sda6 /etc/cryptdisk-keys/crypt.unenc

/lib/cryptsetup/cryptdisks.functions contains the following parsing code in function do_start():

        egrep -v "^[[:space:]]*(#|$)" $TABFILE | while read dst src key opts; do

                # Make sure that all fields are present
                if [ "x$dst" = "x" ]; then
                        continue
                elif [ -z "$src" ] || [ -z "$key" ] || [ -z "$opts" ]; then
                        log_progress_msg "$dst(skipped, missing parameters)"
                        continue
                fi

(sorry for the linebreaks)

If I am not mistaken the elif clause means that if the "opts" variable is empty, the current crypttab entry is ignored.

As can be seen in my crypttab line above i have only specified data for "src", "dst" and "key" but not for "opts". My crypttab worked fine in Ubuntu Feisty so far. Today I did an upgrade and it suddenly failed the way I described.

Revision history for this message
moritz (moritz-gnu) wrote :

wouldn't it be a good idea to simply remove the -z "$opts" check or something?

Revision history for this message
Reinhard Tartler (siretart) wrote :

The manpage is pretty clear on this:

       The fourth field options describes the cryptsetup options associated with the encryption process. At minimum, the field should contain the string luks or the cipher, hash and size options.

If you have a patch for upgrading at hand, feel free to attach it to this bug.

Changed in cryptsetup:
importance: Undecided → Wishlist
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.