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
This commit is contained in:
Christian Göttsche
2020-06-23 19:10:03 +02:00
parent 21385e639a
commit a11bfc17dc
+5
View File
@@ -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) {