From 317232f024c86b63e4b74f7e459d481bd312d9df Mon Sep 17 00:00:00 2001 From: Kris Moore Date: Tue, 4 Nov 2014 04:59:45 +0000 Subject: - Add support for GELI passphrase passthrough to EFI booting - Bump PORTREV --- sysutils/grub2-efi/Makefile | 2 +- .../grub2-efi/files/patch-grub-core_disk_geli.c | 26 ++++++++-------------- 2 files changed, 10 insertions(+), 18 deletions(-) (limited to 'sysutils/grub2-efi') diff --git a/sysutils/grub2-efi/Makefile b/sysutils/grub2-efi/Makefile index 8762e137a6df..2af9c315ba6b 100644 --- a/sysutils/grub2-efi/Makefile +++ b/sysutils/grub2-efi/Makefile @@ -3,7 +3,7 @@ PORTNAME= grub2-efi PORTVERSION= 2.02 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= sysutils MASTER_SITES= http://www.pcbsd.org/~kris/software/ \ ftp://ftp.pcbsd.org/pub/software/ diff --git a/sysutils/grub2-efi/files/patch-grub-core_disk_geli.c b/sysutils/grub2-efi/files/patch-grub-core_disk_geli.c index 57bf25f10e33..9dd42058df5c 100644 --- a/sysutils/grub2-efi/files/patch-grub-core_disk_geli.c +++ b/sysutils/grub2-efi/files/patch-grub-core_disk_geli.c @@ -1,20 +1,12 @@ --- grub-core/disk/geli.c.orig 2014-05-15 14:00:10.000000000 -0400 -+++ grub-core/disk/geli.c 2014-05-20 14:46:07.604565349 -0400 -@@ -225,7 +225,7 @@ ++++ grub-core/disk/geli.c 2014-09-26 10:18:53.325111693 -0400 +@@ -430,6 +430,9 @@ + if (!grub_password_get (passphrase, MAX_PASSPHRASE)) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "Passphrase not supplied"); - /* Look for GELI magic sequence. */ - if (grub_memcmp (header->magic, GELI_MAGIC, sizeof (GELI_MAGIC)) -- || grub_le_to_cpu32 (header->version) > 5 -+ || grub_le_to_cpu32 (header->version) > 7 - || grub_le_to_cpu32 (header->version) < 1) - grub_util_error ("%s", _("wrong ELI magic or version")); - -@@ -265,7 +265,7 @@ - - /* Look for GELI magic sequence. */ - if (grub_memcmp (header.magic, GELI_MAGIC, sizeof (GELI_MAGIC)) -- || grub_le_to_cpu32 (header.version) > 5 -+ || grub_le_to_cpu32 (header.version) > 7 - || grub_le_to_cpu32 (header.version) < 1) ++ /* Set the GELI passphrase to GRUB env, for passing to FreeBSD kernel */ ++ grub_env_set ("gelipassphrase", passphrase); ++ + /* Calculate the PBKDF2 of the user supplied passphrase. */ + if (grub_le_to_cpu32 (header.niter) != 0) { - grub_dprintf ("geli", "wrong magic %02x\n", header.magic[0]); -- cgit v1.2.3