From: Christian Göttsche Date: Fri, 19 Jun 2020 16:24:10 +0000 (+0200) Subject: Initialize SELinux in user instances X-Git-Tag: v246-rc1~109^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a11bfc17dcfbfb748504dbb1d92c68c24db0f2cb;p=thirdparty%2Fsystemd.git 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 --- 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) {