summaryrefslogtreecommitdiff
path: root/src/shared/selinux-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-10-10 16:35:44 +0200
committerLennart Poettering <lennart@poettering.net>2013-10-10 16:35:44 +0200
commitd682b3a7e7c7c2941a4d3e193f1e330dbc9fae89 (patch)
treef9e0c1c2af7b0756af89db0864a0708076a55144 /src/shared/selinux-util.c
parent0581dac2c146cef0f55841a4c136dc48409c8eaa (diff)
security: rework selinux, smack, ima, apparmor detection logic
Always cache the results, and bypass low-level security calls when the respective subsystem is not enabled.
Diffstat (limited to 'src/shared/selinux-util.c')
-rw-r--r--src/shared/selinux-util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shared/selinux-util.c b/src/shared/selinux-util.c
index ff3375607f..026ae5a9e8 100644
--- a/src/shared/selinux-util.c
+++ b/src/shared/selinux-util.c
@@ -39,4 +39,13 @@ void retest_selinux(void) {
use_selinux_cached = -1;
}
+#else
+
+bool use_selinux(void) {
+ return false;
+}
+
+void retest_selinux(void) {
+}
+
#endif