From b11db0106389f678ff146b18f3526adb1b9675cd Mon Sep 17 00:00:00 2001 From: allanjude Date: Fri, 8 Apr 2016 01:27:40 +0000 Subject: [PATCH] GELIBoot should only prompt for the GELI passphrase if the provider has the G_ELI_FLAG_GELIBOOT set PR: 208251 Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D5870 --- sys/boot/geli/geliboot.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/boot/geli/geliboot.c b/sys/boot/geli/geliboot.c index c7146162652e..df40c3bf1d8d 100644 --- a/sys/boot/geli/geliboot.c +++ b/sys/boot/geli/geliboot.c @@ -90,12 +90,12 @@ geli_taste(int read_func(void *vdev, void *priv, off_t off, void *buf, return (error); } - if ((md.md_flags & G_ELI_FLAG_ONETIME)) { - /* Swap device, skip it. */ + if (!(md.md_flags & G_ELI_FLAG_GELIBOOT)) { + /* The GELIBOOT feature is not activated */ return (1); } - if (!(md.md_flags & G_ELI_FLAG_BOOT)) { - /* Disk is not GELI boot device, skip it. */ + if ((md.md_flags & G_ELI_FLAG_ONETIME)) { + /* Swap device, skip it. */ return (1); } if (md.md_iterations < 0) {