]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/shared/ima-util.c
Merge pull request #8575 from keszybz/non-absolute-paths
[thirdparty/systemd.git] / src / shared / ima-util.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 /***
3 This file is part of systemd.
4
5 Copyright 2013 Lennart Poettering
6 ***/
7
8 #include <unistd.h>
9
10 #include "ima-util.h"
11
12 static int use_ima_cached = -1;
13
14 bool use_ima(void) {
15
16 if (use_ima_cached < 0)
17 use_ima_cached = access("/sys/kernel/security/ima/", F_OK) >= 0;
18
19 return use_ima_cached;
20 }