[systemd-devel] [PATCH] This patch solves the bug 52630 described here: https://bugs.freedesktop.org/show_bug.cgi?id=52630 .
qlefebvre_pro at yahoo.com
qlefebvre_pro at yahoo.com
Tue Nov 18 06:54:10 PST 2014
From: Quentin Lefebvre <qlefebvre_pro at yahoo.com>
For plain dm-crypt devices, the behavior of cryptsetup package is to ignore the hash algorithm when a key file is provided.
With this patch, systemd-cryptsetup now behaves as cryptsetup, so that old plain dm-crypt devices created with cryptsetup can be mounted at boot time by systemd, with no modification of /etc/crypttab.
---
src/cryptsetup/cryptsetup.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
index 94570eb..88626da 100644
--- a/src/cryptsetup/cryptsetup.c
+++ b/src/cryptsetup/cryptsetup.c
@@ -403,6 +403,11 @@ static int attach_luks_or_plain(struct crypt_device *cd,
} else
params.hash = "ripemd160";
+ /* for CRYPT_PLAIN, the behavior of cryptsetup package
+ * is to ignore the hash algorithm when a key file is provided */
+ if (key_file)
+ params.hash = NULL;
+
if (arg_cipher) {
size_t l;
--
2.1.3
More information about the systemd-devel
mailing list