Description of problem: SELinux is preventing systemd from 'connectto' accesses on the unix_stream_socket /run/systemd/journal/stdout. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that systemd should be allowed connectto access on the stdout unix_stream_socket by default. Then you should report this as a bug. You can generate a local policy module to allow this access. Do allow this access for now by executing: # ausearch -c 'systemd' --raw | audit2allow -M my-systemd # semodule -X 300 -i my-systemd.pp Additional Information: Source Context system_u:system_r:init_t:s0 Target Context system_u:system_r:kernel_t:s0 Target Objects /run/systemd/journal/stdout [ unix_stream_socket ] Source systemd Source Path systemd Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages Policy RPM selinux-policy-3.13.1-236.fc26.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 4.9.6-200.fc25.x86_64 #1 SMP Thu Jan 26 10:17:45 UTC 2017 x86_64 x86_64 Alert Count 74 First Seen 2017-02-02 15:02:06 CET Last Seen 2017-02-02 15:03:24 CET Local ID 81daed45-0cf3-4426-88c5-ede9aa22f842 Raw Audit Messages type=AVC msg=audit(1486044204.161:366): avc: denied { connectto } for pid=2846 comm="(spatcher)" path="/run/systemd/journal/stdout" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=unix_stream_socket permissive=0 Hash: systemd,init_t,kernel_t,unix_stream_socket,connectto Version-Release number of selected component: selinux-policy-3.13.1-236.fc26.noarch Additional info: component: selinux-policy reporter: libreport-2.9.0 hashmarkername: setroubleshoot kernel: 4.9.6-200.fc25.x86_64 type: libreport
printf 'type=AVC msg=audit(1486044204.161:366): avc: denied { connectto } for pid=2846 comm="(spatcher)" path="/run/systemd/journal/stdout" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=unix_stream_socket permissive=0' | audit2allow #============= init_t ============== #!!!! The file '/run/systemd/journal/stdout' is mislabeled on your system. #!!!! Fix with $ restorecon -R -v /run/systemd/journal/stdout allow init_t kernel_t:unix_stream_socket connectto; But I do not think the file is mislabeled sh$ ls -dZ /run/systemd/journal/stdout system_u:object_r:syslogd_var_run_t:s0 /run/systemd/journal/stdout sh$ ls -dZ /run/systemd/journal/ system_u:object_r:syslogd_var_run_t:s0 /run/systemd/journal/ sh$ ls -dZ /run/systemd/ system_u:object_r:init_var_run_t:s0 /run/systemd/ sh$ ls -dZ /run/ system_u:object_r:var_run_t:s0 /run/ sh$ ls -dZ / system_u:object_r:root_t:s0 / sh$ matchpathcon /run/systemd/journal/stdout /run/systemd/journal/stdout system_u:object_r:syslogd_var_run_t:s0 sh$ matchpathcon /run/systemd/journal/ /run/systemd/journal system_u:object_r:syslogd_var_run_t:s0 sh$ matchpathcon /run/systemd/ /run/systemd system_u:object_r:init_var_run_t:s0 sh$ matchpathcon /run/ /run system_u:object_r:var_run_t:s0 sh$ matchpathcon / / system_u:object_r:root_t:s0
I think it can be related to your change in selinux-policy. https://github.com/fedora-selinux/selinux-policy/pull/184 Is it correct?
Maybe. Can you try the following patch: https://github.com/keszybz/selinux-policy/commit/c79965b7e2e49bd63df71661a1925f6c4cc733a8 ?
(In reply to Zbigniew Jędrzejewski-Szmek from comment #3) > Maybe. Can you try the following patch: > https://github.com/keszybz/selinux-policy/commit/ > c79965b7e2e49bd63df71661a1925f6c4cc733a8 ? Yes it helped. Maybe you can add also a comment why this line is needed :-)
Merged, Thanks.
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle. Changing version to '26'.
selinux-policy-3.13.1-251.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f36794dd98
selinux-policy-3.13.1-251.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-f36794dd98
selinux-policy-3.13.1-251.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.