normal: Cancel the authentication when the submenu returns to the parent menu
PATCH 1/1 normal: Cancel the authentication when the submenu returns to the parent menu
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 <[email protected]>
--- grub-core/normal/menu.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
grub-core/normal/menu.c +10 -7
@@ -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 ; }
Signature · 1 line
2.20.1