Package: cryptsetup
Version: 1.0.3-2
Severity: important

Hi,
the latest version of cryptsetup fails to create create encrypted swap
devices like this one:
swap    /dev/hda6       /dev/random     swap

This is because do_swap (and do_tmp btw) are called after the check on
the device is done. This way the check obviously fails because it
doesn't find a valid swap device. The attached patch fixes this.

Bye
diff -u cryptsetup-1.0.3/debian/cryptdisks.functions cryptsetup-1.0.3/debian/cryptdisks.functions
--- cryptsetup-1.0.3/debian/cryptdisks.functions
+++ cryptsetup-1.0.3/debian/cryptdisks.functions
@@ -311,6 +311,9 @@
 		$CRYPTCMD $PARAMS create $dst $src <&1
 		RESULT=$?
 		if [ $RESULT = 0 ] ; then
+			do_swap
+			do_tmp
+
 			if [ "$CHECK" != ""  ] && ! $CHECK $MAPPER/$dst $CHECKARGS; then
 				echo -e "\n - the check for '$MAPPER/$dst' failed - maybe the password is wrong" >&2
 				echo " - removing the crypto device $dst" >&2
@@ -380,14 +383,12 @@
 			parse_opts
 			check_key
 			lo_setup
-
+		
 			if test "x$USELUKS" = "xyes" ; then
 				do_luks
 			else
 				do_noluks
 			fi
-			do_swap
-			do_tmp
 			
 			clean_keys

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to