Created
December 23, 2020 06:07
-
-
Save sargun/1a107d58c473a7e31546ec49560a9db1 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
/* Linux Kernel v5.10 | |
* 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