volume_key/volume_key-0.3.12-support_LUKS2_and_more.patch
Troy Dawson 92c91e1127 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/volume_key#aa271563e1153ee8924b84ca29995671f0f24a0d
2020-10-15 13:28:28 -07:00

25 lines
717 B
Diff

diff --git a/lib/volume_luks.c b/lib/volume_luks.c
index f4bf2c8..d1c5d47 100644
--- a/lib/volume_luks.c
+++ b/lib/volume_luks.c
@@ -30,6 +30,10 @@ Author: Miloslav Trmač <mitr@redhat.com> */
#include "volume.h"
#include "volume_luks.h"
+#ifndef CRYPT_LUKS
+#define CRYPT_LUKS NULL
+#endif
+
/* LUKS - specific code */
/* Return an error message for ERR_NO, for g_free (). */
@@ -105,7 +109,7 @@ open_crypt_device (const char *path, char **last_log_entry, GError **error)
if (r < 0)
goto err;
crypt_set_log_callback(cd, record_cryptsetup_log_entry, last_log_entry);
- r = crypt_load (cd, CRYPT_LUKS1, NULL);
+ r = crypt_load (cd, CRYPT_LUKS, NULL);
if (r < 0)
goto err_cd;
return cd;