]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/tomoyo-util.c
tree-wide: drop license boilerplate
[thirdparty/systemd.git] / src / shared / tomoyo-util.c
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
ed440f6b
SL
2/***
3 This file is part of systemd.
4
5 Copyright 2017 Shawn Landden
ed440f6b
SL
6***/
7
8#include <unistd.h>
9
10#include "tomoyo-util.h"
11
12bool mac_tomoyo_use(void) {
13 static int cached_use = -1;
14
15 if (cached_use < 0)
16 cached_use = (access("/sys/kernel/security/tomoyo/version",
17 F_OK) == 0);
18
19 return cached_use;
20}