]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/apparmor-util.c
catalog: update Polish translation
[thirdparty/systemd.git] / src / shared / apparmor-util.c
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
d682b3a7 2
a8fbdf54
TA
3#include <stddef.h>
4
b5efdb8a 5#include "alloc-util.h"
d682b3a7 6#include "apparmor-util.h"
6bedfcbb
LP
7#include "fileio.h"
8#include "parse-util.h"
d682b3a7 9
6baa7db0
LP
10bool mac_apparmor_use(void) {
11 static int cached_use = -1;
d682b3a7 12
6baa7db0 13 if (cached_use < 0) {
d682b3a7
LP
14 _cleanup_free_ char *p = NULL;
15
6baa7db0 16 cached_use =
d682b3a7
LP
17 read_one_line_file("/sys/module/apparmor/parameters/enabled", &p) >= 0 &&
18 parse_boolean(p) > 0;
19 }
20
6baa7db0 21 return cached_use;
d682b3a7 22}