summaryrefslogtreecommitdiff
path: root/src/label.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-10-27 05:47:02 +0200
committerLennart Poettering <lennart@poettering.net>2010-10-27 05:47:02 +0200
commitc4dcdb9f4785937f2b73700e66b8cafa452f60a7 (patch)
tree6f4fc5d360c6ffff57f911e580c6747800958baa /src/label.c
parentade509ce73ba1de3bcda8b012961a3045f721df7 (diff)
selinux: automatically load policy if the initrd hasn't done this for us yet
Diffstat (limited to 'src/label.c')
-rw-r--r--src/label.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/label.c b/src/label.c
index 809b1ee646..01f36eb6cc 100644
--- a/src/label.c
+++ b/src/label.c
@@ -51,6 +51,9 @@ int label_init(void) {
if (!use_selinux())
return 0;
+ if (label_hnd)
+ return 0;
+
label_hnd = selabel_open(SELABEL_CTX_FILE, NULL, 0);
if (!label_hnd) {
log_full(security_getenforce() == 1 ? LOG_ERR : LOG_DEBUG,