summaryrefslogtreecommitdiff
path: root/src/label.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-08-29 23:36:10 +0200
committerLennart Poettering <lennart@poettering.net>2011-08-29 23:36:10 +0200
commit4d4c74866c12c98b2834e8eff218b74cb83bb608 (patch)
tree54421474a5f370f7c9f24fd2691fe98596429791 /src/label.c
parent990a1abae249a52eed6fa6489d54873726510620 (diff)
selinux: retest selinux after we loaded the policy
Diffstat (limited to 'src/label.c')
-rw-r--r--src/label.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/label.c b/src/label.c
index a5994622c7..fb9a1b4262 100644
--- a/src/label.c
+++ b/src/label.c
@@ -33,8 +33,9 @@
static struct selabel_handle *label_hnd = NULL;
+static int use_selinux_cached = -1;
+
static inline bool use_selinux(void) {
- static int use_selinux_cached = -1;
if (use_selinux_cached < 0)
use_selinux_cached = is_selinux_enabled() > 0;
@@ -42,6 +43,10 @@ static inline bool use_selinux(void) {
return use_selinux_cached;
}
+void label_retest_selinux(void) {
+ use_selinux_cached = -1;
+}
+
#endif
int label_init(void) {