verifiers: File type for fine-grained signature-verification controlling
Let's provide file type info to the I/O layer. This way verifiers framework and its users will be able to differentiate files and verify only required ones. This is preparatory patch. 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
f3f8347569
commit
ca0a4f689a
70 changed files with 292 additions and 221 deletions
|
@ -165,7 +165,7 @@ grub_cmd_file (grub_extcmd_context_t ctxt, int argc, char **args)
|
|||
if (type == -1)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "no type specified");
|
||||
|
||||
file = grub_file_open (args[0]);
|
||||
file = grub_file_open (args[0], GRUB_FILE_TYPE_XNU_KERNEL);
|
||||
if (!file)
|
||||
return grub_errno;
|
||||
switch (type)
|
||||
|
@ -546,7 +546,8 @@ grub_cmd_file (grub_extcmd_context_t ctxt, int argc, char **args)
|
|||
case IS_XNU64:
|
||||
case IS_XNU32:
|
||||
{
|
||||
macho = grub_macho_open (args[0], (type == IS_XNU64));
|
||||
macho = grub_macho_open (args[0], GRUB_FILE_TYPE_XNU_KERNEL,
|
||||
(type == IS_XNU64));
|
||||
if (!macho)
|
||||
break;
|
||||
/* FIXME: more checks? */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue