SELinux is preventing 72733A6D61696E20513A526567 from 'open' accesses on the file /var/log/ntpd.log. ***** Plugin catchall (100. confidence) suggests *************************** If you believe that 72733A6D61696E20513A526567 should be allowed open access on the ntpd.log 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: # grep 72733A6D61696E20513A526567 /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp Additional Information: Source Context system_u:system_r:syslogd_t:s0 Target Context system_u:object_r:ntpd_log_t:s0 Target Objects /var/log/ntpd.log [ file ] Source 72733A6D61696E20513A526567 Source Path 72733A6D61696E20513A526567 Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages Policy RPM selinux-policy-3.9.16-34.fc15 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 2.6.38.8-35.fc15.x86_64 #1 SMP Wed Jul 6 13:58:54 UTC 2011 x86_64 x86_64 Alert Count 7 First Seen Thu 28 Jul 2011 04:04:29 PM KST Last Seen Thu 28 Jul 2011 04:04:36 PM KST Local ID 91ef6a74-73d9-40e1-9d5f-3f3655a0f007 Raw Audit Messages type=AVC msg=audit(1311836676.361:80): avc: denied { open } for pid=1215 comm=72733A6D61696E20513A526567 name="ntpd.log" dev=dm-1 ino=3146123 scontext=system_u:system_r:syslogd_t:s0 tcontext=system_u:object_r:ntpd_log_t:s0 tclass=file Hash: 72733A6D61696E20513A526567,syslogd_t,ntpd_log_t,file,open audit2allow #============= syslogd_t ============== allow syslogd_t ntpd_log_t:file open; audit2allow -R #============= syslogd_t ============== allow syslogd_t ntpd_log_t:file open;
Why is syslogd trying to open the ntpd log file?
Tomas, any idea?
rsyslog should only access files it is configured to through /etc/rsyslog.conf and /etc/rsyslog.d/*. With the default configuration, it shouldn't touch this file, have you modified it in any way?
I added /etc/rsyslog.d/ntp.conf with the following contents: # Filter messages from the ntp service and send to a separate log :programname, isequal, "ntpd" /var/log/ntpd.log & ~ A pretty reasonable request I think.
# restorecon -R -v /etc/rsyslog.d/ntp.conf
I disagree. The ABRT said to file this as a bug: "If you believe that 72733A6D61696E20513A526567 should be allowed open access on the ntpd.log file by default." This should be allowed access by default. The purpose of a system logger is to write logs, typically in /var/log/.. so by default rsyslog should be able to write to any log in /var/log without selinux magic. This does not happen on an enterprise linux box. On our RHEL 6.1 machines we have not had any selinux issues with configuring rsyslog to write logs in /var/log, this only happens on Fedora. So I will concede, but I do think this is a bug. Thanks for looking into it.
My fault, I was concerning on /etc/rsyslog.d/ntp.conf but the problem is with /var/log/ntpd.log
Tomas?
Miroslav lets allow syslog to manage all log files.
Fixed in selinux-policy-3.9.16-38.fc15
selinux-policy-3.9.16-38.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-38.fc15
Package selinux-policy-3.9.16-38.fc15: * should fix your issue, * was pushed to the Fedora 15 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing selinux-policy-3.9.16-38.fc15' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-38.fc15 then log in and leave karma (feedback).
selinux-policy-3.9.16-38.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.