SELinux is preventing systemd-readahe from 'read, open' accesses on the file /usr/sbin/consoletype.

Lawrence Graves lgraves95 at gmail.com
Wed Dec 19 12:47:33 UTC 2012


SELinux is preventing systemd-readahe from 'read, open' accesses on the 
file /usr/sbin/consoletype.

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

If you want to allow systemd-readahe to have read open access on the 
consoletype file
Then you need to change the label on /usr/sbin/consoletype
Do
# semanage fcontext -a -t FILE_TYPE '/usr/sbin/consoletype'
where FILE_TYPE is one of the following: rpm_script_tmp_t, 
ld_so_cache_t, readahead_t, machineid_t, abrt_var_run_t, etc_runtime_t, 
sysctl_crypto_t, domain, anon_inodefs_t, readahead_var_lib_t, 
readahead_var_run_t, locale_t, ld_so_t, abrt_t, base_ro_file_type, 
lib_t, man_t, sysctl_type, sysctl_vm_overcommit_t, cpu_online_t, 
mandb_cache_t, cgroup_t, sysfs_t, tmpfs_t, abrt_helper_exec_t, 
fail2ban_var_lib_t, proc_t, non_security_file_type, textrel_shlib_t, 
readahead_exec_t, sysctl_kernel_t, prelink_exec_t.
Then execute:
restorecon -v '/usr/sbin/consoletype'


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

If you believe that systemd-readahe should be allowed read open access 
on the consoletype 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 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 /usr/sbin/consoletype [ file ]
Source systemd-readahe
Source Path systemd-readahe
Port <Unknown>
Host JesusChrist
Source RPM Packages
Target RPM Packages initscripts-9.42.1-1.fc18.x86_64
Policy RPM selinux-policy-3.11.1-66.fc18.noarch
Selinux Enabled True
Policy Type targeted
Enforcing Mode Enforcing
Host Name JesusChrist
Platform Linux JesusChrist 3.6.11-3.fc18.x86_64 #1 SMP Mon
Dec 17 21:35:39 UTC 2012 x86_64 x86_64
Alert Count 2
First Seen 2012-12-19 05:43:39 MST
Last Seen 2012-12-19 05:44:13 MST
Local ID 390ae583-5b9f-49d8-936a-df101e2bab53

Raw Audit Messages
type=AVC msg=audit(1355921053.540:323): avc: denied { read open } for 
pid=288 comm="systemd-readahe" path="/usr/sbin/consoletype" dev="sda3" 
ino=380414 scontext=system_u:system_r:readahead_t:s0 
tcontext=system_u:object_r:unlabeled_t:s0 tclass=file


Hash: systemd-readahe,readahead_t,unlabeled_t,file,read,open

audit2allow

#============= readahead_t ==============
allow readahead_t unlabeled_t:file { read open };

audit2allow -R

#============= readahead_t ==============
allow readahead_t unlabeled_t:file { read open };
-- 
All things are workable but don't all things work. Prov. 3:5 & 6


More information about the test mailing list