mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 14:59:34 +00:00
kern/lockdown: Set a variable if the GRUB is locked down
It may be useful for scripts to determine whether the GRUB is locked down or not. Add the lockdown variable which is set to "y" when the GRUB is locked down. Suggested-by: Dimitri John Ledkov <xnox@ubuntu.com> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
578c95298b
commit
d903674717
2 files changed
+7
No files matched your search
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include <grub/dl.h>
|
||||
#include <grub/env.h>
|
||||
#include <grub/file.h>
|
||||
#include <grub/lockdown.h>
|
||||
#include <grub/verify.h>
|
||||
@@ -71,6 +72,9 @@ grub_lockdown (void)
|
||||
lockdown = GRUB_LOCKDOWN_ENABLED;
|
||||
|
||||
grub_verifier_register (&lockdown_verifier);
|
||||
|
||||
grub_env_set ("lockdown", "y");
|
||||
grub_env_export ("lockdown");
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in new issue
Block a user