Created
December 23, 2020 04:50
-
-
Save sargun/5c7f2898fd358d7dfb50c5a21b776e4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Excerpt from trusted_tpm1.c | |
* https://elixir.bootlin.com/linux/latest/source/security/keys/trusted-keys/trusted_tpm1.c#L387 | |
*/ | |
static int pcrlock(const int pcrnum) | |
{ | |
if (!capable(CAP_SYS_ADMIN)) | |
return -EPERM; | |
return tpm_pcr_extend(chip, pcrnum, digests) ? -EINVAL : 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment