lkml.org 
[lkml]   [2004]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] device-mapper: dm-crypt fix for zero-length key
dm-crypt fix for zero-length key.

Signed-Off-By: Christophe Saout <christophe@saout.de>
Signed-Off-By: Alasdair G Kergon <agk@redhat.com>
--- diff/drivers/md/dm-crypt.c 2004-11-10 15:05:04.000000000 +0000
+++ source/drivers/md/dm-crypt.c 2004-11-10 15:05:24.000000000 +0000
@@ -569,8 +569,8 @@
}

cc->key_size = key_size;
- if ((key_size == 0 && strcmp(argv[1], "-") != 0)
- || crypt_decode_key(cc->key, argv[1], key_size) < 0) {
+ if ((!key_size && strcmp(argv[1], "-") != 0) ||
+ (key_size && crypt_decode_key(cc->key, argv[1], key_size) < 0)) {
ti->error = PFX "Error decoding key";
goto bad1;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.062 / U:0.096 seconds]
©2003-2014 Jasper Spaans. Advertise on this site