grub2/grub2-menu-unrestricted.patch
Michael Chang 012e0e85e4 Accepting request 1227248 from home:gary_lin:branches:Base:System
- Support s390x Secure Execution (jsc#PED-9531)
  * grub2-s390x-secure-execution-support.patch
- Update grub2-s390x-set-hostonly.patch to add the patch header
  and the description

OBS-URL: https://build.opensuse.org/request/show/1227248
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=524
2024-11-29 08:48:07 +00:00

22 lines
516 B
Diff

--- a/grub-core/normal/menu.c
+++ b/grub-core/normal/menu.c
@@ -212,7 +212,17 @@
grub_size_t sz = 0;
if (entry->restricted)
- err = grub_auth_check_authentication (entry->users);
+ {
+ int auth_check = 1;
+ if (entry->users && entry->users[0] == 0)
+ {
+ const char *unr = grub_env_get ("unrestricted_menu");
+ if (unr && (unr[0] == '1' || unr[0] == 'y'))
+ auth_check = 0;
+ }
+ if (auth_check)
+ err = grub_auth_check_authentication (entry->users);
+ }
if (err)
{