It could be confusing for the user to enter a menu entry with the "--Unrestricted" parameter set (no authentication required), but the user still needed to authenticate before returning to the parent menu via "ESC". This logic was probably incorrect, so I changed it.
Signed-off-by: zhouzilong <zhouzil...@uniontech.com> --- grub-core/normal/menu.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c index 8397886fa..fc2ca6ff0 100644 --- a/grub-core/normal/menu.c +++ b/grub-core/normal/menu.c @@ -897,13 +897,16 @@ grub_show_menu (grub_menu_t menu, int nested, int autoboot) if (grub_normal_exit_level) break; - err2 = grub_auth_check_authentication (NULL); - if (err2) - { - grub_print_error (); - grub_errno = GRUB_ERR_NONE; - continue; - } + if (!nested) + { + err2 = grub_auth_check_authentication (NULL); + if (err2) + { + grub_print_error (); + grub_errno = GRUB_ERR_NONE; + continue; + } + } break; } -- 2.20.1 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel