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
This commit is contained in:
allanjude 2016-04-08 01:27:40 +00:00
parent 9554f17afb
commit b11db01063

View File

@ -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) {