grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Kris Moore <kris@pcbsd.org>
To: grub-devel@gnu.org
Subject: Patch to support GELI passphrase passthrough
Date: Wed, 22 Oct 2014 13:12:32 -0400	[thread overview]
Message-ID: <5447E580.1010409@pcbsd.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 570 bytes --]



Hey, just a small patch to submit today. If you rather I send this to
the bug tracker then I can do that also.

This patch allows exporting the FreeBSD GELI passphrase to the kernel
environment, which we will be doing in PC-BSD to avoid prompting for the
passphrase a second time at bootup.

Let me know if you have any suggestions or need any changes. I'm
currently hacking on support for EFI framebuffer settings to be passed
to FreeBSD kernel as well, will send patches once I get things working
there.

-- 
Kris Moore
PC-BSD Software
iXsystems


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch-grub-core_disk_geli.c --]
[-- Type: text/x-csrc; name="patch-grub-core_disk_geli.c", Size: 536 bytes --]

--- grub-core/disk/geli.c.orig	2014-05-15 14:00:10.000000000 -0400
+++ 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");
 
+  /* 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)
     {

             reply	other threads:[~2014-10-22 17:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-22 17:12 Kris Moore [this message]
2014-10-22 17:47 ` Patch to support GELI passphrase passthrough Andrei Borzenkov
2014-10-22 17:50   ` Kris Moore
2014-10-27 14:56     ` Kris Moore
2014-11-28 19:36       ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-12-08 22:20         ` Kris Moore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5447E580.1010409@pcbsd.org \
    --to=kris@pcbsd.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).