diff options
author | Dmitry Kasatkin <d.kasatkin@samsung.com> | 2014-06-27 06:01:32 -0400 |
---|---|---|
committer | Mimi Zohar <zohar@linux.vnet.ibm.com> | 2014-09-17 16:10:59 -0400 |
commit | 31b70f66328e85517b159c786ab31f3fd9a7293c (patch) | |
tree | 64032d2001ddb216c6234592c8c7af921790c394 /security/integrity/ima/ima_init.c | |
parent | ac60ab4b4968b54fb5af20eac9dd78e36ad910c1 (diff) |
ima: move keyring initialization to ima_init()
ima_init() is used as a single place for all initializations.
Experimental keyring patches used the 'late_initcall' which was
co-located with the late_initcall(init_ima). When the late_initcall
for the keyring initialization was abandoned, initialization moved
to init_ima, though it would be more logical to move it to ima_init,
where the rest of the initialization is done. This patch moves the
keyring initialization to ima_init() as a preparatory step for
loading the keys which will be added to ima_init() in following
patches.
Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Diffstat (limited to 'security/integrity/ima/ima_init.c')
-rw-r--r-- | security/integrity/ima/ima_init.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/security/integrity/ima/ima_init.c b/security/integrity/ima/ima_init.c index e8f9d70a465d..8cf0f39c8cd2 100644 --- a/security/integrity/ima/ima_init.c +++ b/security/integrity/ima/ima_init.c | |||
@@ -98,6 +98,10 @@ int __init ima_init(void) | |||
98 | if (!ima_used_chip) | 98 | if (!ima_used_chip) |
99 | pr_info("No TPM chip found, activating TPM-bypass!\n"); | 99 | pr_info("No TPM chip found, activating TPM-bypass!\n"); |
100 | 100 | ||
101 | rc = ima_init_keyring(INTEGRITY_KEYRING_IMA); | ||
102 | if (rc) | ||
103 | return rc; | ||
104 | |||
101 | rc = ima_init_crypto(); | 105 | rc = ima_init_crypto(); |
102 | if (rc) | 106 | if (rc) |
103 | return rc; | 107 | return rc; |