Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Apr 2023 04:15:29 GMT
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: f0cb73450966 - stable/13 - loader: lua: disable autoboot timer after password entry
Message-ID:  <202304200415.33K4FTYM060770@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=f0cb73450966fd064015efc8fc0342a44f9eb1d7

commit f0cb73450966fd064015efc8fc0342a44f9eb1d7
Author:     Cyrus Rahman <crahman@gmail.com>
AuthorDate: 2023-04-16 02:30:41 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2023-04-20 04:15:15 +0000

    loader: lua: disable autoboot timer after password entry
    
    In the lua loader, if one sets a password in loader.conf, the
    autoboot_delay timer will start before the menu is displayed.  One can
    interrupt the autoboot and bring up the menu by entering a keyboard
    character before the timer expires.
    
    If this is done a prompt for the password is displayed.  Entering the
    password will bring up the menu, but the timer will again start and
    another keyboard character must be entered or autoboot will abort the
    menu and boot the system.
    
    PR:             265472
    Reviewed by:    kevans
    MFC after:      3 days
    
    (cherry picked from commit 0ab68e9272b573becdb42edf2b4419cb7ab04707)
---
 stand/lua/password.lua | 1 +
 1 file changed, 1 insertion(+)

diff --git a/stand/lua/password.lua b/stand/lua/password.lua
index 8edd4edd7ec3..3aea8e80bae6 100644
--- a/stand/lua/password.lua
+++ b/stand/lua/password.lua
@@ -135,6 +135,7 @@ function password.check()
 	local pwd = loader.getenv("password")
 	if pwd ~= nil then
 		core.autoboot()
+		loader.setenv("autoboot_delay", "NO")
 		-- The autoboot sequence was interrupted, so we'll need to
 		-- prompt for a password.  Put the screen back into a known
 		-- good state, otherwise we're drawing back a couple lines



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304200415.33K4FTYM060770>