Description of problem: When running systemd-journal-remote in listen mode to accept logs from remote machines, the process is not allowed to write to the default log directory (/var/log/journal/remote/). 20. 12/04/2020 20:03:50 systemd-journal system_u:system_r:init_t:s0 0 file rename system_u:object_r:var_log_t:s0 denied 31559 time->Fri Dec 4 20:03:50 2020 type=AVC msg=audit(1607112230.791:31559): avc: denied { rename } for pid=3993771 comm="systemd-journal" name="remote-CN=<redacted>.journal" dev="sde5" ino=115647558 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file permissive=0 The process name is wrong for some reason, the process with pid 3993771 is /usr/lib/systemd/systemd-journal-remote. $ ls -lZ /usr/lib/systemd/systemd-journal-remote -rwxr-xr-x. 1 root root system_u:object_r:init_exec_t:s0 70696 Oct 1 15:15 /usr/lib/systemd/systemd-journal-remote Version-Release number of selected component (if applicable): selinux-policy-targeted-3.14.6-30.fc33.noarch How reproducible: Always Steps to Reproduce: 1. Start systemd-journal-remote 2. Send logs from remote machine to systemd-journal-remote 3. Actual results: Logs not written, avc entries Expected results: Logs written
Log messages during the failure: Dec 07 09:22:41 ethan systemd-journal-remote[3993771]: /var/log/journal/remote//remote-CN=mail-202.tara.dn.lalufu.net,O=dn.lalufu.net,L=Winterfell,ST=Skyrim,C=TAM.journal: Journal header limits reached or header out-of-date, rotating Dec 07 09:22:41 ethan systemd-journal-remote[3993771]: Failed to rotate /var/log/journal/remote//remote-CN=<redacted>.journal: Permission denied Dec 07 09:22:41 ethan systemd-journal-remote[3993771]: Failed to write entry of 562 bytes: Permission denied Dec 07 09:22:41 ethan systemd-journal-remote[3993771]: Failed to process data, aborting connection 0x555d536dcdc0: Permission denied Dec 07 09:22:41 ethan systemd-journal-remote[3993771]: microhttpd: Application reported internal error, closing connection. sealert output: SELinux is preventing systemd-journal from rename access on the file labeled var_log_t. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that systemd-journal should be allowed rename access on file labeled var_log_t 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-journal' --raw | audit2allow -M my-systemdjournal # semodule -X 300 -i my-systemdjournal.pp Additional Information: Source Context system_u:system_r:init_t:s0 Target Context system_u:object_r:var_log_t:s0 Target Objects Unknown [ file ] Source systemd-journal Source Path systemd-journal Port <Unknown> Host ethan Source RPM Packages Target RPM Packages SELinux Policy RPM selinux-policy-targeted-3.14.6-30.fc33.noarch Local Policy RPM selinux-policy-targeted-3.14.6-30.fc33.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name ethan Platform Linux ethan 5.9.11-200.fc33.x86_64 #1 SMP Tue Nov 24 18:18:01 UTC 2020 x86_64 x86_64 Alert Count 7466 First Seen 2020-12-04 18:04:18 UTC Last Seen 2020-12-07 09:23:42 UTC Local ID c01f88a2-7446-411b-b6b3-52105deaedba Raw Audit Messages type=AVC msg=audit(1607333022.296:130059): avc: denied { rename } for pid=3993771 comm="systemd-journal" name="remote-CN=<redacted>.journal" dev="sde5" ino=115647558 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file permissive=0 Hash: systemd-journal,init_t,var_log_t,file,rename
This message is a reminder that Fedora 33 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '33'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 33 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 33 changed to end-of-life (EOL) status on 2021-11-30. Fedora 33 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.