1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 
3 #include <unistd.h>
4 
5 #include "tomoyo-util.h"
6 
mac_tomoyo_use(void)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 }
16