forked from pool/grub2
Accepting request 341627 from home:michael-chang:branches:Base:System
- Allow to execute menuentry unrestricted as default (fate#318574) * added grub2-menu-unrestricted.patch OBS-URL: https://build.opensuse.org/request/show/341627 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=185
This commit is contained in:
parent
b346757383
commit
c75a5674a1
23
grub2-menu-unrestricted.patch
Normal file
23
grub2-menu-unrestricted.patch
Normal file
@ -0,0 +1,23 @@
|
||||
Index: grub-2.02~beta2/grub-core/normal/menu.c
|
||||
===================================================================
|
||||
--- grub-2.02~beta2.orig/grub-core/normal/menu.c
|
||||
+++ grub-2.02~beta2/grub-core/normal/menu.c
|
||||
@@ -213,7 +213,17 @@ grub_menu_execute_entry(grub_menu_entry_
|
||||
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)
|
||||
{
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 30 10:09:02 UTC 2015 - mchang@suse.com
|
||||
|
||||
- Allow to execute menuentry unrestricted as default (fate#318574)
|
||||
* added grub2-menu-unrestricted.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 29 04:17:08 UTC 2015 - mchang@suse.com
|
||||
|
||||
|
@ -205,6 +205,7 @@ Patch67: grub2-Initialized-initrd_ctx-so-we-don-t-free-a-random-poi.patch
|
||||
Patch68: grub2-btrfs-fix-get_root-key-comparison-failures-due-to-en.patch
|
||||
Patch69: grub2-getroot-fix-get-btrfs-fs-prefix-big-endian.patch
|
||||
Patch70: grub2-default-distributor.patch
|
||||
Patch71: grub2-menu-unrestricted.patch
|
||||
# Btrfs snapshot booting related patches
|
||||
Patch101: grub2-btrfs-01-add-ability-to-boot-from-subvolumes.patch
|
||||
Patch102: grub2-btrfs-02-export-subvolume-envvars.patch
|
||||
@ -477,6 +478,7 @@ mv po/grub.pot po/%{name}.pot
|
||||
%patch68 -p1
|
||||
%patch69 -p1
|
||||
%patch70 -p1
|
||||
%patch71 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
%patch103 -p1
|
||||
|
Loading…
Reference in New Issue
Block a user