ima: audit is compiled only when enabled
IMA auditing code was compiled even when CONFIG_AUDIT was not enabled. This patch compiles auditing code only when possible and enabled. Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com> Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
This commit is contained in:

committed by
Mimi Zohar

parent
7ff2267af5
commit
417c6c8ee2
@@ -61,10 +61,19 @@ struct ima_queue_entry {
|
||||
};
|
||||
extern struct list_head ima_measurements; /* list of all measurements */
|
||||
|
||||
#ifdef CONFIG_IMA_AUDIT
|
||||
/* declarations */
|
||||
void integrity_audit_msg(int audit_msgno, struct inode *inode,
|
||||
const unsigned char *fname, const char *op,
|
||||
const char *cause, int result, int info);
|
||||
#else
|
||||
static inline void integrity_audit_msg(int audit_msgno, struct inode *inode,
|
||||
const unsigned char *fname,
|
||||
const char *op, const char *cause,
|
||||
int result, int info)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Internal IMA function definitions */
|
||||
int ima_init(void);
|
||||
|
Reference in New Issue
Block a user