summaryrefslogtreecommitdiffstats
path: root/security/integrity/ima/ima_appraise.c
diff options
context:
space:
mode:
authorMimi Zohar <zohar@linux.vnet.ibm.com>2013-08-13 08:47:43 -0400
committerMimi Zohar <zohar@linux.vnet.ibm.com>2013-10-31 20:20:48 -0400
commit217091dd7a7a1bdac027ddb7c5a25f6ac0b8e241 (patch)
tree3a8a39da527431153698fc73640db47e8a1bd43a /security/integrity/ima/ima_appraise.c
parentbcbc9b0cf6d8f340a1d166e414f4612b353f7a9b (diff)
downloadlinux-217091dd7a7a1bdac027ddb7c5a25f6ac0b8e241.tar.gz
linux-217091dd7a7a1bdac027ddb7c5a25f6ac0b8e241.tar.bz2
linux-217091dd7a7a1bdac027ddb7c5a25f6ac0b8e241.zip
ima: define '_ima' as a builtin 'trusted' keyring
Require all keys added to the IMA keyring be signed by an existing trusted key on the system trusted keyring. Changelog: - define stub integrity_init_keyring() function (reported-by Fengguang Wu) - differentiate between regular and trusted keyring names. - replace printk with pr_info (D. Kasatkin) Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Diffstat (limited to 'security/integrity/ima/ima_appraise.c')
-rw-r--r--security/integrity/ima/ima_appraise.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/security/integrity/ima/ima_appraise.c b/security/integrity/ima/ima_appraise.c
index 734e9468aca0..46353ee517f6 100644
--- a/security/integrity/ima/ima_appraise.c
+++ b/security/integrity/ima/ima_appraise.c
@@ -381,3 +381,14 @@ int ima_inode_removexattr(struct dentry *dentry, const char *xattr_name)
}
return result;
}
+
+#ifdef CONFIG_IMA_TRUSTED_KEYRING
+static int __init init_ima_keyring(void)
+{
+ int ret;
+
+ ret = integrity_init_keyring(INTEGRITY_KEYRING_IMA);
+ return 0;
+}
+late_initcall(init_ima_keyring);
+#endif