Measure the kernel commandline
Measure the kernel commandline to ensure that it hasn't been modified
This commit is contained in:
parent
20e355fd5a
commit
2d410729e9
1 changed files with 5 additions and 1 deletions
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include <grub/lib/cmdline.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/tpm.h>
|
||||
|
||||
static unsigned int check_arg (char *c, int *has_space)
|
||||
{
|
||||
|
@ -67,7 +68,7 @@ int grub_create_loader_cmdline (int argc, char *argv[], char *buf,
|
|||
{
|
||||
int i, space;
|
||||
unsigned int arg_size;
|
||||
char *c;
|
||||
char *c, *orig = buf;
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
|
@ -104,5 +105,8 @@ int grub_create_loader_cmdline (int argc, char *argv[], char *buf,
|
|||
|
||||
*buf = 0;
|
||||
|
||||
grub_tpm_measure ((void *)orig, grub_strlen (orig), GRUB_CMDLINE_PCR,
|
||||
"Kernel Commandline");
|
||||
|
||||
return i;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue