[CentOS] C7, mdadm generating selinux warnings

Sat Jun 27 19:55:26 UTC 2020
Fred Smith <fredex at fcshome.stoneham.ma.us>

Hi!

I'm getting these frequently. several times I've done the steps listed
there to suppress the messages, but I keep getting them.

Anyone got a good idea how to deal with this?

Thanks in advance!

----------------------------

SELinux is preventing mdadm from 'read, open' accesses on the file /var/log/rear/rear-fcshome.log.lockless.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/var/log/rear/rear-fcshome.log.lockless default label should be var_log_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /var/log/rear/rear-fcshome.log.lockless

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that mdadm should be allowed read open access on the rear-fcshome.log.lockless file 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 'mdadm' --raw | audit2allow -M my-mdadm
# semodule -i my-mdadm.pp

Additional Information:
Source Context                system_u:system_r:mdadm_t:s0-s0:c0.c1023
Target Context                system_u:object_r:cron_log_t:s0

-- 
---- Fred Smith -- fredex at fcshome.stoneham.ma.us -----------------------------
                       I can do all things through Christ 
                              who strengthens me.
------------------------------ Philippians 4:13 -------------------------------