summaryrefslogtreecommitdiff
path: root/sys-fs/cryptsetup/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-09-25 20:21:45 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-09-25 20:21:45 +0100
commitc719fdcee603a5a706a45d10cb598762d56a727d (patch)
tree620cbf137661399a3fb1eff92914204f9a970713 /sys-fs/cryptsetup/files
parentcc4618c9ba3d974948ebf340b542d8cb01db2f55 (diff)
gentoo resync : 25.09.2021
Diffstat (limited to 'sys-fs/cryptsetup/files')
-rw-r--r--sys-fs/cryptsetup/files/cryptsetup-2.4.1-external-tokens.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/sys-fs/cryptsetup/files/cryptsetup-2.4.1-external-tokens.patch b/sys-fs/cryptsetup/files/cryptsetup-2.4.1-external-tokens.patch
new file mode 100644
index 000000000000..1777a02652ce
--- /dev/null
+++ b/sys-fs/cryptsetup/files/cryptsetup-2.4.1-external-tokens.patch
@@ -0,0 +1,34 @@
+From a1b577c085cc9ef6b95c4556ec8815070828ee6c Mon Sep 17 00:00:00 2001
+From: Hector Martin <marcan@marcan.st>
+Date: Fri, 17 Sep 2021 05:44:18 +0000
+Subject: [PATCH] Do not attempt to unload external tokens if
+ USE_EXTERNAL_TOKENS is disabled.
+
+This allows building a static binary as long as --disable-external-tokens is used
+---
+ lib/luks2/luks2_token.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/luks2/luks2_token.c b/lib/luks2/luks2_token.c
+index d34cebf5..88d84418 100644
+--- a/lib/luks2/luks2_token.c
++++ b/lib/luks2/luks2_token.c
+@@ -245,6 +245,7 @@ int crypt_token_register(const crypt_token_handler *handler)
+
+ void crypt_token_unload_external_all(struct crypt_device *cd)
+ {
++#if USE_EXTERNAL_TOKENS
+ int i;
+
+ for (i = LUKS2_TOKENS_MAX - 1; i >= 0; i--) {
+@@ -258,6 +259,7 @@ void crypt_token_unload_external_all(struct crypt_device *cd)
+ if (dlclose(CONST_CAST(void *)token_handlers[i].u.v2.dlhandle))
+ log_dbg(cd, "%s", dlerror());
+ }
++#endif
+ }
+
+ static const void
+--
+GitLab
+