Bug 265472 - /boot/loader: lua autoboot timer restarts if menu password is set
Summary: /boot/loader: lua autoboot timer restarts if menu password is set
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.2-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: Kyle Evans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-28 00:17 UTC by crahman
Modified: 2023-04-20 04:41 UTC (History)
4 users (show)

See Also:
kevans: mfc-stable13?
kevans: mfc-stable12-


Attachments
After interrupting the autoboot timeout, prevent it from restarting. (530 bytes, patch)
2022-07-28 00:17 UTC, crahman
no flags Details | Diff
After interrupting the autoboot timeout, prevent it from restarting. (513 bytes, patch)
2023-04-09 08:01 UTC, crahman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description crahman 2022-07-28 00:17:42 UTC
Created attachment 235517 [details]
After interrupting the autoboot timeout, prevent it from restarting.

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.

This is unexpected and not useful.

A patch to correct the problem is attached.
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:35:25 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>
Comment 2 crahman 2023-04-09 08:01:58 UTC
Created attachment 241366 [details]
After interrupting the autoboot timeout, prevent it from restarting.

Update to 13.2-RELEASE
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-04-16 02:40:57 UTC
A commit in branch main references this bug:

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

commit 0ab68e9272b573becdb42edf2b4419cb7ab04707
Author:     Cyrus Rahman <crahman@gmail.com>
AuthorDate: 2023-04-16 02:30:41 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2023-04-16 02:39:56 +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

 stand/lua/password.lua | 1 +
 1 file changed, 1 insertion(+)
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-04-20 04:15:42 UTC
A commit in branch stable/13 references this bug:

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(+)
Comment 5 Kyle Evans freebsd_committer freebsd_triage 2023-04-20 04:41:21 UTC
Thanks for the patch!