From a11bfc17dcfbfb748504dbb1d92c68c24db0f2cb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20G=C3=B6ttsche?= Date: Fri, 19 Jun 2020 18:24:10 +0200 Subject: [PATCH] Initialize SELinux in user instances Call mac_selinux_init() to setup the label cache, so objects can be created with default SELinux context. Fixes: #8004 --- src/core/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/main.c b/src/core/main.c index 6e606d412af..4e1e443a287 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -2603,6 +2603,11 @@ int main(int argc, char *argv[]) { /* clear the kernel timestamp, * because we are not PID 1 */ kernel_timestamp = DUAL_TIMESTAMP_NULL; + + if (mac_selinux_init() < 0) { + error_message = "Failed to initialize SELinux support"; + goto finish; + } } if (arg_system) { -- 2.47.3