summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-10-03 20:15:44 -0400
committerMimi Zohar <zohar@linux.ibm.com>2018-10-10 12:56:15 -0400
commit2ab5daf867d1f7898327962d59d3039206294d3a (patch)
tree9e871519cecc565395135d459bf2b7fd0400eb33 /security
parentb2724d5802a77b7fb47e84d9b88b80370eccbc64 (diff)
security/integrity: remove unnecessary 'init_keyring' variable
The 'init_keyring' variable actually just gave the value of CONFIG_INTEGRITY_TRUSTED_KEYRING. We should check the config option directly instead. No change in behavior; this just simplifies the code. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'security')
-rw-r--r--security/integrity/digsig.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/security/integrity/digsig.c b/security/integrity/digsig.c
index 879396fa3be0..5eacba858e4b 100644
--- a/security/integrity/digsig.c
+++ b/security/integrity/digsig.c
@@ -37,12 +37,6 @@ static const char * const keyring_name[INTEGRITY_KEYRING_MAX] = {
37 "_module", 37 "_module",
38}; 38};
39 39
40#ifdef CONFIG_INTEGRITY_TRUSTED_KEYRING
41static bool init_keyring __initdata = true;
42#else
43static bool init_keyring __initdata;
44#endif
45
46#ifdef CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY 40#ifdef CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY
47#define restrict_link_to_ima restrict_link_by_builtin_and_secondary_trusted 41#define restrict_link_to_ima restrict_link_by_builtin_and_secondary_trusted
48#else 42#else
@@ -85,7 +79,7 @@ int __init integrity_init_keyring(const unsigned int id)
85 struct key_restriction *restriction; 79 struct key_restriction *restriction;
86 int err = 0; 80 int err = 0;
87 81
88 if (!init_keyring) 82 if (!IS_ENABLED(CONFIG_INTEGRITY_TRUSTED_KEYRING))
89 return 0; 83 return 0;
90 84
91 restriction = kzalloc(sizeof(struct key_restriction), GFP_KERNEL); 85 restriction = kzalloc(sizeof(struct key_restriction), GFP_KERNEL);