summaryrefslogblamecommitdiff
path: root/system/mkinitfs/0001-nlplug-findfs-add-primitive-support-for-LUKS2-contai.patch
blob: 7681be46b340cf86b8fe0933a5919fc131576c28 (plain) (tree)






























                                                                          
From 15e312961e1bc86da98f2d3dc1d43331bd6f98f7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Sat, 20 Jan 2018 00:50:15 +0100
Subject: [PATCH] nlplug-findfs: add primitive support for LUKS2 containers

Since we previously specified an explicit request_type for the
crypt_load() function nlplug-findfs couldn't open LUKS2 containers. By
using CRYPT_LUKS crypt_load accepts any known LUKUS container format.

We could add an additional command line flag to nlplug-finds for
specifying the request_type but I guess this is good enough for now.
---
 nlplug-findfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nlplug-findfs.c b/nlplug-findfs.c
index be525cc..7fb5468 100644
--- a/nlplug-findfs.c
+++ b/nlplug-findfs.c
@@ -582,7 +582,7 @@ static void *cryptsetup_thread(void *data)
 		goto notify_out;
 	}
 
-	r = crypt_load(cd, CRYPT_LUKS1, params);
+	r = crypt_load(cd, CRYPT_LUKS, params);
 	if (r < 0) {
 		warnx("crypt_load(%s)", data_devnode);
 		goto free_out;
-- 
2.15.0