mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-23 07:39:22 +00:00
Add possibility to verify kernel command lines.
This commit is contained in:
1 parent
4f280d955e
commit
ba5401b197
19 files changed
+139
-38
No files matched your search
@@ -33,6 +33,7 @@
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/env.h>
|
||||
#include <grub/linux.h>
|
||||
#include <grub/verify.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
@@ -543,6 +544,12 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
p = grub_stpcpy (p, argv[i]);
|
||||
}
|
||||
cmdline[10] = '=';
|
||||
|
||||
*p = '\0';
|
||||
|
||||
err = grub_verify_string (cmdline, GRUB_VERIFY_KERNEL_CMDLINE);
|
||||
if (err)
|
||||
goto fail;
|
||||
|
||||
boot_param->command_line = (grub_uint64_t) cmdline;
|
||||
boot_param->efi_systab = (grub_uint64_t) grub_efi_system_table;
|
||||
|
||||
Reference in new issue
Block a user