diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-06-19 18:24:10 +0200 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2020-06-23 19:10:03 +0200 |
commit | a11bfc17dcfbfb748504dbb1d92c68c24db0f2cb (patch) | |
tree | d13d9d65cebdece02284c026315a9bb91e01348b /src/core/main.c | |
parent | man: replace perl bug tracker link that went away with link to paper (diff) | |
download | systemd-a11bfc17dcfbfb748504dbb1d92c68c24db0f2cb.tar.xz systemd-a11bfc17dcfbfb748504dbb1d92c68c24db0f2cb.zip |
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
Diffstat (limited to '')
-rw-r--r-- | src/core/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/main.c b/src/core/main.c index 6e606d412a..4e1e443a28 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) { |