aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/grub2-pcbsd/files/patch-grub-core_disk_geli.c
blob: f8d1f9bed333ce4cee3076545e9ec3bd0d346dc0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
--- grub-core/disk/geli.c.orig	2015-01-30 16:34:55 UTC
+++ grub-core/disk/geli.c
@@ -445,6 +445,9 @@ recover_key (grub_disk_t source, grub_cr
   if (!grub_password_get (passphrase, MAX_PASSPHRASE))
     return grub_error (GRUB_ERR_BAD_ARGUMENT, "Passphrase not supplied");
 
+  /* 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)
     {