From d682b3a7e7c7c2941a4d3e193f1e330dbc9fae89 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 10 Oct 2013 16:35:44 +0200 Subject: 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. --- src/shared/selinux-util.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/shared/selinux-util.c') 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 -- cgit v1.2.3-54-g00ecf