From 3f6d4a462639a67e950cf9b3cb3e597ac79b6104 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Tue, 9 Nov 2021 08:28:41 +0100 Subject: [PATCH 277/325] sys/geom/eli: For the last passphrase entering attempt, turn on visibility ... in case the keyboard is prelling. Obtained from: ElectroBSD --- sys/geom/eli/g_eli.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/geom/eli/g_eli.c b/sys/geom/eli/g_eli.c index e08812575693..21e9f0e93d24 100644 --- a/sys/geom/eli/g_eli.c +++ b/sys/geom/eli/g_eli.c @@ -1219,8 +1219,14 @@ g_eli_taste(struct g_class *mp, struct g_provider *pp, int flags __unused) memcpy(passphrase, cached_passphrase, sizeof(passphrase)); } else { + showpass = g_eli_visible_passphrase; + if (!showpass && i == tries) { + G_ELI_DEBUG(0, "Last try for %s. " + "Turning visibility on!!!", + pp->name); + showpass = 1; + } printf("Enter passphrase for %s: ", pp->name); - showpass = g_eli_visible_passphrase; if ((md.md_flags & G_ELI_FLAG_GELIDISPLAYPASS) != 0) showpass = GETS_ECHOPASS; cngets(passphrase, sizeof(passphrase), -- 2.32.0