ima: Move to LSM infrastructure
[linux-2.6-block.git] / security / keys / key.c
index 31a8b9408b7cd547ca576ca34c5c652e94792111..5607900383298fa95997de8cbd9455db268af403 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/security.h>
 #include <linux/workqueue.h>
 #include <linux/random.h>
-#include <linux/ima.h>
 #include <linux/err.h>
 #include "internal.h"
 
@@ -932,8 +931,6 @@ static key_ref_t __key_create_or_update(key_ref_t keyring_ref,
 
        security_key_post_create_or_update(keyring, key, payload, plen, flags,
                                           true);
-       ima_post_key_create_or_update(keyring, key, payload, plen,
-                                     flags, true);
 
        key_ref = make_key_ref(key, is_key_possessed(keyring_ref));
 
@@ -965,13 +962,9 @@ error:
 
        key_ref = __key_update(key_ref, &prep);
 
-       if (!IS_ERR(key_ref)) {
+       if (!IS_ERR(key_ref))
                security_key_post_create_or_update(keyring, key, payload, plen,
                                                   flags, false);
-               ima_post_key_create_or_update(keyring, key,
-                                             payload, plen,
-                                             flags, false);
-       }
 
        goto error_free_prep;
 }