]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
ed440f6b SL |
2 | |
3 | #include <unistd.h> | |
4 | ||
5 | #include "tomoyo-util.h" | |
6 | ||
7 | bool mac_tomoyo_use(void) { | |
8 | static int cached_use = -1; | |
9 | ||
10 | if (cached_use < 0) | |
11 | cached_use = (access("/sys/kernel/security/tomoyo/version", | |
12 | F_OK) == 0); | |
13 | ||
14 | return cached_use; | |
15 | } |