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
|
@ -35,6 +35,7 @@
|
|||
#include <grub/ns8250.h>
|
||||
#include <grub/bsdlabel.h>
|
||||
#include <grub/crypto.h>
|
||||
#include <grub/verify.h>
|
||||
#ifdef GRUB_MACHINE_PCBIOS
|
||||
#include <grub/machine/int.h>
|
||||
#endif
|
||||
|
@ -416,6 +417,8 @@ grub_freebsd_add_meta_module (const char *filename, const char *type,
|
|||
grub_addr_t addr, grub_uint32_t size)
|
||||
{
|
||||
const char *name;
|
||||
grub_err_t err;
|
||||
|
||||
name = grub_strrchr (filename, '/');
|
||||
if (name)
|
||||
name++;
|
||||
|
@ -469,6 +472,9 @@ grub_freebsd_add_meta_module (const char *filename, const char *type,
|
|||
*(p++) = ' ';
|
||||
}
|
||||
*p = 0;
|
||||
err = grub_verify_string (cmdline, GRUB_VERIFY_MODULE_CMDLINE);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue