From 6355e75610a8d47fc3ba5ab8bd442172a2cfe574 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 27 Nov 2015 20:22:56 +0100 Subject: selinux: split up mac_selinux_have() from mac_selinux_use() Let's distuingish the cases where our code takes an active role in selinux management, or just passively reports whatever selinux properties are set. mac_selinux_have() now checks whether selinux is around for the passive stuff, and mac_selinux_use() for the active stuff. The latter checks the former, plus also checks UID == 0, under the assumption that only when we run priviliged selinux management really makes sense. Fixes: #1941 --- src/basic/selinux-util.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/basic/selinux-util.h') diff --git a/src/basic/selinux-util.h b/src/basic/selinux-util.h index d19984c5fe..95a2fcdbca 100644 --- a/src/basic/selinux-util.h +++ b/src/basic/selinux-util.h @@ -27,6 +27,7 @@ #include "macro.h" bool mac_selinux_use(void); +bool mac_selinux_have(void); void mac_selinux_retest(void); int mac_selinux_init(const char *prefix); -- cgit v1.2.3-54-g00ecf