grub2/grub2-menu-unrestricted.patch
Michael Chang 543f21c3be - Revert the patches related to BLS support in grub2-mkconfig, as they are not
relevant to the current BLS integration and cause issues in older KIWI
  versions, which actively force it to be enabled by default (bsc#1233196)
  * 0002-Add-BLS-support-to-grub-mkconfig.patch
  * 0003-Add-grub2-switch-to-blscfg.patch
  * 0007-grub-switch-to-blscfg-adapt-to-openSUSE.patch
  * 0008-blscfg-reading-bls-fragments-if-boot-present.patch
  * 0009-10_linux-Some-refinement-for-BLS.patch
  * 0001-10_linux-Do-not-enable-BLSCFG-on-s390-emu.patch

OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=523
2024-11-13 01:57:36 +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)
{