]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/ima-util.c
Merge pull request #12603 from ssahani/ndisc-blacklist
[thirdparty/systemd.git] / src / shared / ima-util.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2
3 #include <unistd.h>
4
5 #include "ima-util.h"
6
7 static int use_ima_cached = -1;
8
9 bool use_ima(void) {
10
11 if (use_ima_cached < 0)
12 use_ima_cached = access("/sys/kernel/security/ima/", F_OK) >= 0;
13
14 return use_ima_cached;
15 }