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
|
@ -186,6 +186,20 @@ grub_verifiers_open (grub_file_t io, enum grub_file_type type)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
grub_verify_string (char *str, enum grub_verify_string_type type)
|
||||
{
|
||||
struct grub_file_verifier *ver;
|
||||
FOR_LIST_ELEMENTS(ver, grub_file_verifiers)
|
||||
{
|
||||
grub_err_t err;
|
||||
err = ver->verify_string ? ver->verify_string (str, type) : GRUB_ERR_NONE;
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
GRUB_MOD_INIT(verifiers)
|
||||
{
|
||||
grub_file_filter_register (GRUB_FILE_FILTER_VERIFY, grub_verifiers_open);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue