ima: Fix undefined arch_ima_get_secureboot() and co
authorTakashi Iwai <tiwai@suse.de>
Mon, 13 Dec 2021 16:11:45 +0000 (17:11 +0100)
committerMimi Zohar <zohar@linux.ibm.com>
Fri, 24 Dec 2021 15:24:30 +0000 (10:24 -0500)
commit54bf7fa3efd08eea03e4bac04e188ee3db6173a7
tree8e8d3874be2afab5e1ca90498ae603abf5165e9c
parent136057256686de39cc3a07c2e39ef6bc43003ff6
ima: Fix undefined arch_ima_get_secureboot() and co

Currently arch_ima_get_secureboot() and arch_get_ima_policy() are
defined only when CONFIG_IMA is set, and this makes any code calling
those functions without CONFIG_IMA fail.

Move the declaration and the dummy definition of those functions
outside ifdef-CONFIG_IMA block for fixing the undefined symbols.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
[zohar@linux.ibm.com: removed in-tree/out-of-tree comment in patch description]
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
include/linux/ima.h