diff options
author | James Morris <james.l.morris@oracle.com> | 2014-11-19 21:36:07 +1100 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2014-11-19 21:36:07 +1100 |
commit | a6aacbde406eeb6f8fc218b2c6172825f5e73fcf (patch) | |
tree | b79e1a17c38090915085f0dbb501a0970cb79b28 /security/integrity/ima/ima_init.c | |
parent | b10778a00d40b3d9fdaaf5891e802794781ff71c (diff) | |
parent | 6fb5032ebb1c5b852461d64ee33829081de8ca61 (diff) | |
download | linux-a6aacbde406eeb6f8fc218b2c6172825f5e73fcf.tar.bz2 |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity into next
Diffstat (limited to 'security/integrity/ima/ima_init.c')
-rw-r--r-- | security/integrity/ima/ima_init.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/security/integrity/ima/ima_init.c b/security/integrity/ima/ima_init.c index 9164fc8cac84..5e4c29d174ee 100644 --- a/security/integrity/ima/ima_init.c +++ b/security/integrity/ima/ima_init.c @@ -24,6 +24,12 @@ #include <crypto/hash_info.h> #include "ima.h" +#ifdef CONFIG_IMA_X509_PATH +#define IMA_X509_PATH CONFIG_IMA_X509_PATH +#else +#define IMA_X509_PATH "/etc/keys/x509_ima.der" +#endif + /* name for boot aggregate entry */ static const char *boot_aggregate_name = "boot_aggregate"; int ima_used_chip; @@ -91,6 +97,17 @@ err_out: return result; } +#ifdef CONFIG_IMA_LOAD_X509 +void __init ima_load_x509(void) +{ + int unset_flags = ima_policy_flag & IMA_APPRAISE; + + ima_policy_flag &= ~unset_flags; + integrity_load_x509(INTEGRITY_KEYRING_IMA, IMA_X509_PATH); + ima_policy_flag |= unset_flags; +} +#endif + int __init ima_init(void) { u8 pcr_i[TPM_DIGEST_SIZE]; |