Making persistent-encryption=luks strict.
authorTails developers <amnesia@boum.org>
Tue, 8 Nov 2011 14:51:14 +0000 (15:51 +0100)
committerDaniel Baumann <daniel@debian.org>
Thu, 24 Nov 2011 08:42:08 +0000 (09:42 +0100)
When specified we completely ignore unencrypted media when probing for
persistent media.

scripts/live-helpers

index 950bbda..912d800 100644 (file)
@@ -324,12 +324,18 @@ find_cow_device ()
                        if echo "${black_listed_devices}" | grep -q -w "${devname}"
                        then
                                # skip this subdevice
-                               break
+                               continue
                        fi
 
                        # Checking for a luks device
-                       if [ "${PERSISTENT_ENCRYPTION}" = "luks" ] && [ -e /sbin/cryptsetup ] && /sbin/cryptsetup isLuks ${devname}
+                       if [ "${PERSISTENT_ENCRYPTION}" = "luks" ] && [ -e /sbin/cryptsetup ]
                        then
+                               if ! /sbin/cryptsetup isLuks ${devname}
+                               then
+                                       # we only look for encrypted subdevices
+                                       continue
+                               fi
+
                                while true
                                do
                                        load_keymap