Bug 1039741

Summary: SELinux is preventing systemd-readahe from 'search' accesses on the directory mcelog.
Product: [Fedora] Fedora Reporter: Eric Blake <eblake>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:21966a82d73bc7f8b871e3cdf32f2758e84e03d70de9b1df37777c759f29da79
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-10 07:54:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Eric Blake 2013-12-09 21:38:28 UTC
Description of problem:
SELinux is preventing systemd-readahe from 'search' accesses on the directory mcelog.

*****  Plugin catchall_labels (83.8 confidence) suggests   *******************

If you want to allow systemd-readahe to have search access on the mcelog directory
Then you need to change the label on mcelog
Do
# semanage fcontext -a -t FILE_TYPE 'mcelog'
where FILE_TYPE is one of the following: rpm_script_tmp_t, readahead_t, security_t, cfengine_var_lib_t, rpm_log_t, default_t, var_log_t, abrt_var_run_t, var_run_t, device_t, devpts_t, proc_net_t, init_var_run_t, sysctl_crypto_t, var_lib_t, var_run_t, file_type, device_t, tmp_t, var_t, domain, proc_type, inotifyfs_t, anon_inodefs_t, sysctl_vm_t, readahead_var_lib_t, readahead_var_run_t, setrans_var_run_t, device_t, locale_t, etc_t, proc_t, sysfs_t, sysctl_t, abrt_t, bin_t, base_ro_file_type, lib_t, man_t, mnt_t, root_t, sysctl_type, filesystem_type, autofs_t, device_t, devpts_t, tmp_t, usr_t, var_t, sysctl_vm_overcommit_t, cpu_online_t, proc_t, mandb_cache_t, cgroup_t, sysfs_t, tmpfs_t, fail2ban_var_lib_t, abrt_var_run_t, nscd_var_run_t, proc_t, var_lib_t, var_run_t, root_t, var_t, non_security_file_type, cfengine_var_lib_t, textrel_shlib_t, httpd_sys_content_t, sysctl_kernel_t, proc_t, sysctl_t, bin_t. 
Then execute: 
restorecon -v 'mcelog'


*****  Plugin catchall (17.1 confidence) suggests   **************************

If you believe that systemd-readahe should be allowed search access on the mcelog directory 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 systemd-readahe /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:readahead_t:s0
Target Context                system_u:object_r:unlabeled_t:s0
Target Objects                mcelog [ dir ]
Source                        systemd-readahe
Source Path                   systemd-readahe
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-66.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.6.10-4.fc18.x86_64 #1 SMP Tue
                              Dec 11 18:01:27 UTC 2012 x86_64 x86_64
Alert Count                   1
First Seen                    2013-12-09 11:47:12 MST
Last Seen                     2013-12-09 11:47:12 MST
Local ID                      6088a5ab-dbb0-44d0-8e6d-b5db0be4767f

Raw Audit Messages
type=AVC msg=audit(1386614832.237:355): avc:  denied  { search } for  pid=449 comm="systemd-readahe" name="mcelog" dev="dm-2" ino=679658 scontext=system_u:system_r:readahead_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=dir


Hash: systemd-readahe,readahead_t,unlabeled_t,dir,search

Additional info:
reporter:       libreport-2.1.9
hashmarkername: setroubleshoot
kernel:         3.11.10-300.fc20.x86_64
type:           libreport

Potential duplicate: bug 910997

Comment 1 Miroslav Grepl 2013-12-10 07:54:13 UTC

*** This bug has been marked as a duplicate of bug 1039737 ***