verifiers: Add possibility to verify kernel and modules command lines
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
This commit is contained in:
parent
75a919e334
commit
4d4a8c96e3
18 changed files with 136 additions and 37 deletions
|
@ -33,6 +33,7 @@
|
|||
#include <grub/extcmd.h>
|
||||
#include <grub/env.h>
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/verify.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
|
@ -425,6 +426,10 @@ grub_cmd_xnu_kernel (grub_command_t cmd __attribute__ ((unused)),
|
|||
if (ptr != grub_xnu_cmdline)
|
||||
*(ptr - 1) = 0;
|
||||
|
||||
err = grub_verify_string (grub_xnu_cmdline, GRUB_VERIFY_KERNEL_CMDLINE);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
#if defined (__i386) && !defined (GRUB_MACHINE_EFI)
|
||||
err = grub_efiemu_autocore ();
|
||||
if (err)
|
||||
|
@ -534,6 +539,10 @@ grub_cmd_xnu_kernel64 (grub_command_t cmd __attribute__ ((unused)),
|
|||
if (ptr != grub_xnu_cmdline)
|
||||
*(ptr - 1) = 0;
|
||||
|
||||
err = grub_verify_string (grub_xnu_cmdline, GRUB_VERIFY_KERNEL_CMDLINE);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
#if defined (__i386) && !defined (GRUB_MACHINE_EFI)
|
||||
err = grub_efiemu_autocore ();
|
||||
if (err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue