Blame SOURCES/cryptsetup-2.6.0-Copy-also-integrity-string-in-legacy-mode.patch
|
|
5c2830 |
From 19c15a652f878458493f0ac335110e2779f3cbe3 Mon Sep 17 00:00:00 2001
|
|
|
5c2830 |
From: Ondrej Kozina <okozina@redhat.com>
|
|
|
5c2830 |
Date: Wed, 12 Oct 2022 11:59:09 +0200
|
|
|
5c2830 |
Subject: [PATCH 4/5] Copy also integrity string in legacy mode.
|
|
|
5c2830 |
|
|
|
5c2830 |
So that it handles integrity string same as it does
|
|
|
5c2830 |
with cipher string.
|
|
|
5c2830 |
---
|
|
|
5c2830 |
lib/utils_crypt.c | 9 ++++++++-
|
|
|
5c2830 |
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
5c2830 |
|
|
|
5c2830 |
diff --git a/lib/utils_crypt.c b/lib/utils_crypt.c
|
|
|
5c2830 |
index 4f4dbba8..93f846d7 100644
|
|
|
5c2830 |
--- a/lib/utils_crypt.c
|
|
|
5c2830 |
+++ b/lib/utils_crypt.c
|
|
|
5c2830 |
@@ -284,7 +284,14 @@ int crypt_capi_to_cipher(char **org_c, char **org_i, const char *c_dm, const cha
|
|
|
5c2830 |
if (strncmp(c_dm, "capi:", 4)) {
|
|
|
5c2830 |
if (!(*org_c = strdup(c_dm)))
|
|
|
5c2830 |
return -ENOMEM;
|
|
|
5c2830 |
- *org_i = NULL;
|
|
|
5c2830 |
+ if (i_dm) {
|
|
|
5c2830 |
+ if (!(*org_i = strdup(i_dm))) {
|
|
|
5c2830 |
+ free(*org_c);
|
|
|
5c2830 |
+ *org_c = NULL;
|
|
|
5c2830 |
+ return -ENOMEM;
|
|
|
5c2830 |
+ }
|
|
|
5c2830 |
+ } else
|
|
|
5c2830 |
+ *org_i = NULL;
|
|
|
5c2830 |
return 0;
|
|
|
5c2830 |
}
|
|
|
5c2830 |
|
|
|
5c2830 |
--
|
|
|
5c2830 |
2.38.1
|
|
|
5c2830 |
|