Skip to content

Commit

Permalink
security/integrity: make ima/ima_mok.c explicitly non-modular
Browse files Browse the repository at this point in the history
The Kconfig currently controlling compilation of this code is:

ima/Kconfig:config IMA_MOK_KEYRING
ima/Kconfig: bool "Create IMA machine owner keys (MOK) and blacklist keyrings"

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple of traces of modularity so that when reading the
driver there is no doubt it really is builtin-only.

Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.

Cc: Mimi Zohar <[email protected]>
Cc: Dmitry Kasatkin <[email protected]>
Cc: James Morris <[email protected]>
Cc: "Serge E. Hallyn" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Paul Gortmaker <[email protected]>
Signed-off-by: Mimi Zohar <[email protected]>
  • Loading branch information
Paul Gortmaker authored and Mimi Zohar committed Dec 15, 2015
1 parent 6ad6afa commit 92cc916
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions security/integrity/ima/ima_mok.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <linux/sched.h>
#include <linux/cred.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/init.h>
#include <keys/asymmetric-type.h>


Expand Down Expand Up @@ -52,5 +52,4 @@ __init int ima_mok_init(void)
set_bit(KEY_FLAG_KEEP, &ima_blacklist_keyring->flags);
return 0;
}

module_init(ima_mok_init);
device_initcall(ima_mok_init);

0 comments on commit 92cc916

Please sign in to comment.