From: Quentin Lefebvre <qlefebvre_...@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 _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel