Commit 6a3f6424 authored by segfault's avatar segfault

Add and apply patch to put keyfile path in quotes

parent 3e862b1a
0001-Add-TCRYPT-support.patch
0001-Put-keyfile-path-in-quotes.patch
From 627784c592a2f84e6d877013df6e30951dd0127f Mon Sep 17 00:00:00 2001
From: segfault <segfault@riseup.net>
Date: Tue, 19 Jun 2018 21:02:22 +0200
Subject: [PATCH] Put keyfile path in quotes
---
src/udiskslinuxencrypted.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/udiskslinuxencrypted.c b/src/udiskslinuxencrypted.c
index 332972ea..f62073ef 100644
--- a/src/udiskslinuxencrypted.c
+++ b/src/udiskslinuxencrypted.c
@@ -477,15 +477,16 @@ handle_unlock (UDisksEncrypted *encrypted,
/* build keyfiles string */
for (i = 0; i < MAX_TCRYPT_KEYFILES && keyfiles[i]; i++)
- keyfiles_string_length += strlen(keyfiles[i]) + strlen(" --key-file ");
+ keyfiles_string_length += strlen(keyfiles[i]) + strlen(" --key-file \"\"");
keyfiles_string = g_malloc (keyfiles_string_length + 1);
strcpy (keyfiles_string, "");
for (i = 0; i < MAX_TCRYPT_KEYFILES && keyfiles[i]; i++)
{
- strcat (keyfiles_string, " --key-file ");
+ strcat (keyfiles_string, " --key-file \"");
strcat (keyfiles_string, keyfiles[i]);
+ strcat (keyfiles_string, "\"");
}
result = udisks_daemon_launch_spawned_job_sync (daemon,
--
2.17.1
......@@ -2,3 +2,4 @@
# Debian patches for udisks
0001-Add-TCRYPT-support.patch
0001-Put-keyfile-path-in-quotes.patch
......@@ -477,15 +477,16 @@ handle_unlock (UDisksEncrypted *encrypted,
/* build keyfiles string */
for (i = 0; i < MAX_TCRYPT_KEYFILES && keyfiles[i]; i++)
keyfiles_string_length += strlen(keyfiles[i]) + strlen(" --key-file ");
keyfiles_string_length += strlen(keyfiles[i]) + strlen(" --key-file \"\"");
keyfiles_string = g_malloc (keyfiles_string_length + 1);
strcpy (keyfiles_string, "");
for (i = 0; i < MAX_TCRYPT_KEYFILES && keyfiles[i]; i++)
{
strcat (keyfiles_string, " --key-file ");
strcat (keyfiles_string, " --key-file \"");
strcat (keyfiles_string, keyfiles[i]);
strcat (keyfiles_string, "\"");
}
result = udisks_daemon_launch_spawned_job_sync (daemon,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment