From dd59868b67de77c619b64fc197f5f0299d9e4064 Mon Sep 17 00:00:00 2001 From: Ondrej Kozina Date: Fri, 13 Oct 2017 15:27:30 +0200 Subject: [PATCH] shared/dissect-image: adapt to LUKS2 format Load any LUKS format available (and recognized) by libcryptsetup --- src/shared/dissect-image.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 4b59f2ca7d7..258e8ca67aa 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -19,6 +19,9 @@ #if HAVE_LIBCRYPTSETUP #include +#ifndef CRYPT_LUKS +#define CRYPT_LUKS NULL +#endif #endif #include @@ -843,7 +846,7 @@ static int decrypt_partition( if (r < 0) return log_debug_errno(r, "Failed to initialize dm-crypt: %m"); - r = crypt_load(cd, CRYPT_LUKS1, NULL); + r = crypt_load(cd, CRYPT_LUKS, NULL); if (r < 0) { log_debug_errno(r, "Failed to load LUKS metadata: %m"); goto fail; -- 2.47.3