2020-11-09 05:23:58 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
2013-10-10 16:35:44 +02:00
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2013-10-10 21:13:31 +02:00
|
|
|
#include "ima-util.h"
|
2013-10-10 16:35:44 +02:00
|
|
|
|
|
|
|
static int use_ima_cached = -1;
|
|
|
|
|
|
|
|
bool use_ima(void) {
|
|
|
|
|
|
|
|
if (use_ima_cached < 0)
|
|
|
|
use_ima_cached = access("/sys/kernel/security/ima/", F_OK) >= 0;
|
|
|
|
|
|
|
|
return use_ima_cached;
|
|
|
|
}
|