Blame SOURCES/volume_key-0.3.11-support_LUKS_all.patch

590d58
From d0aa966c014d8301371e693966dcac3d9e9c0ccd Mon Sep 17 00:00:00 2001
590d58
From: Vojtech Trefny <vtrefny@redhat.com>
590d58
Date: Mon, 10 Sep 2018 13:07:41 +0200
590d58
Subject: [PATCH] Add suppport for opening LUKS2 devices
590d58
590d58
---
590d58
 lib/volume_luks.c | 6 +++++-
590d58
 1 file changed, 5 insertions(+), 1 deletion(-)
590d58
590d58
diff --git a/lib/volume_luks.c b/lib/volume_luks.c
590d58
index f4bf2c8..d1c5d47 100644
590d58
--- a/lib/volume_luks.c
590d58
+++ b/lib/volume_luks.c
590d58
@@ -30,6 +30,10 @@ Author: Miloslav Trmač <mitr@redhat.com> */
590d58
 #include "volume.h"
590d58
 #include "volume_luks.h"
590d58
 
590d58
+#ifndef CRYPT_LUKS
590d58
+#define CRYPT_LUKS NULL
590d58
+#endif
590d58
+
590d58
 /* LUKS - specific code */
590d58
 
590d58
 /* Return an error message for ERR_NO, for g_free (). */
590d58
@@ -105,7 +109,7 @@ open_crypt_device (const char *path, char **last_log_entry, GError **error)
590d58
   if (r < 0)
590d58
     goto err;
590d58
   crypt_set_log_callback(cd, record_cryptsetup_log_entry, last_log_entry);
590d58
-  r = crypt_load (cd, CRYPT_LUKS1, NULL);
590d58
+  r = crypt_load (cd, CRYPT_LUKS, NULL);
590d58
   if (r < 0)
590d58
     goto err_cd;
590d58
   return cd;
590d58
-- 
590d58
2.17.1
590d58