[systemd-devel] [PATCH] This patch solves the bug 52630 described here: https://bugs.freedesktop.org/show_bug.cgi?id=52630 .

Quentin Lefebvre qlefebvre_pro at yahoo.com
Wed Nov 19 05:22:02 PST 2014


Hi,

Is there any chance that someone can validate this fix? I tested the 
patch against systemd-215 present in Debian testing, but can't test it 
with the current version.
However, the patch is very simple and should work with the latest version.

Also, the bug involved is pretty important for cryptsetup / dm-crypt 
users, so it would be nice to validate the patch.

Sorry to insist.

Best regards,
Quentin

Le 18/11/2014 15:54, qlefebvre_pro at yahoo.com a écrit :
> 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;
>
>


More information about the systemd-devel mailing list