aboutsummaryrefslogtreecommitdiff
path: root/resources/grub/patch/grub.johnlane.ie/0004-Cryptomount-support-plain-dm-crypt.patch
diff options
context:
space:
mode:
Diffstat (limited to 'resources/grub/patch/grub.johnlane.ie/0004-Cryptomount-support-plain-dm-crypt.patch')
-rw-r--r--resources/grub/patch/grub.johnlane.ie/0004-Cryptomount-support-plain-dm-crypt.patch32
1 files changed, 16 insertions, 16 deletions
diff --git a/resources/grub/patch/grub.johnlane.ie/0004-Cryptomount-support-plain-dm-crypt.patch b/resources/grub/patch/grub.johnlane.ie/0004-Cryptomount-support-plain-dm-crypt.patch
index c8ee671f..f35a393a 100644
--- a/resources/grub/patch/grub.johnlane.ie/0004-Cryptomount-support-plain-dm-crypt.patch
+++ b/resources/grub/patch/grub.johnlane.ie/0004-Cryptomount-support-plain-dm-crypt.patch
@@ -1,19 +1,19 @@
-From c584bacaad58facb9124df26f98fff2542f7237a Mon Sep 17 00:00:00 2001
+From 590e1f484d0e9618882db07786251cdaf6669e9d Mon Sep 17 00:00:00 2001
From: John Lane <john@lane.uk.net>
Date: Fri, 26 Jun 2015 22:09:52 +0100
-Subject: [PATCH 4/5] Cryptomount support plain dm-crypt
+Subject: [PATCH 4/6] Cryptomount support plain dm-crypt
---
grub-core/disk/cryptodisk.c | 298 +++++++++++++++++++++++++++++++++++++++++++-
grub-core/disk/luks.c | 195 +----------------------------
include/grub/cryptodisk.h | 8 ++
- 3 files changed, 310 insertions(+), 191 deletions(-)
+ 3 files changed, 311 insertions(+), 190 deletions(-)
diff --git a/grub-core/disk/cryptodisk.c b/grub-core/disk/cryptodisk.c
-index a27e70c..cd5cfc9 100644
+index 0e7ced8..57fb904 100644
--- a/grub-core/disk/cryptodisk.c
+++ b/grub-core/disk/cryptodisk.c
-@@ -44,6 +44,12 @@ static const struct grub_arg_option options[] =
+@@ -45,6 +45,12 @@ static const struct grub_arg_option options[] =
{"keyfile", 'k', 0, N_("Key file"), 0, ARG_TYPE_STRING},
{"keyfile-offset", 'O', 0, N_("Key file offset (bytes)"), 0, ARG_TYPE_INT},
{"keyfile-size", 'S', 0, N_("Key file data size (bytes)"), 0, ARG_TYPE_INT},
@@ -26,7 +26,7 @@ index a27e70c..cd5cfc9 100644
{0, 0, 0, 0, 0, 0}
};
-@@ -927,6 +933,48 @@ grub_cryptodisk_scan_device (const char *name,
+@@ -932,6 +938,48 @@ grub_cryptodisk_scan_device (const char *name,
return have_it && search_uuid ? 1 : 0;
}
@@ -75,11 +75,10 @@ index a27e70c..cd5cfc9 100644
static grub_err_t
grub_cmd_cryptomount (grub_extcmd_context_t ctxt, int argc, char **args)
{
-@@ -1046,7 +1094,63 @@ grub_cmd_cryptomount (grub_extcmd_context_t ctxt, int argc, char **args)
- return GRUB_ERR_NONE;
- }
+@@ -1061,6 +1109,64 @@ grub_cmd_cryptomount (grub_extcmd_context_t ctxt, int argc, char **args)
+
+ err = grub_cryptodisk_scan_device_real (diskname, disk);
-- err = grub_cryptodisk_scan_device_real (args[0], disk);
+ if (state[7].set) /* Plain mode */
+ {
+ char *cipher;
@@ -137,10 +136,11 @@ index a27e70c..cd5cfc9 100644
+ }
+ else
+ err = grub_cryptodisk_scan_device_real (args[0], disk);
-
++
grub_disk_close (disk);
-
-@@ -1177,13 +1281,203 @@ struct grub_procfs_entry luks_script =
+ if (disklast)
+ *disklast = ')';
+@@ -1192,13 +1298,203 @@ struct grub_procfs_entry luks_script =
.get_contents = luks_script_get
};
@@ -605,7 +605,7 @@ index 11e437e..4ebe21b 100644
grub_free (split_key);
return grub_error (GRUB_ERR_BAD_ARGUMENT, "Passphrase not supplied");
diff --git a/include/grub/cryptodisk.h b/include/grub/cryptodisk.h
-index 0299625..4076412 100644
+index 67f6b0b..bb25ab7 100644
--- a/include/grub/cryptodisk.h
+++ b/include/grub/cryptodisk.h
@@ -54,9 +54,14 @@ typedef enum
@@ -623,7 +623,7 @@ index 0299625..4076412 100644
struct grub_cryptodisk;
typedef gcry_err_code_t
-@@ -159,4 +164,7 @@ grub_util_get_geli_uuid (const char *dev);
+@@ -160,4 +165,7 @@ grub_util_get_geli_uuid (const char *dev);
grub_cryptodisk_t grub_cryptodisk_get_by_uuid (const char *uuid);
grub_cryptodisk_t grub_cryptodisk_get_by_source_disk (grub_disk_t disk);
@@ -632,5 +632,5 @@ index 0299625..4076412 100644
+
#endif
--
-2.1.2
+1.9.1