Bug 710460 - SELinux is preventing /sbin/setfiles from 'read' accesses on the directory /.
Summary: SELinux is preventing /sbin/setfiles from 'read' accesses on the directory /.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:f76d42de099...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-03 13:15 UTC by Clyde E. Kunkel
Modified: 2011-06-03 15:50 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-03 15:50:47 UTC
Type: ---


Attachments (Terms of Use)

Description Clyde E. Kunkel 2011-06-03 13:15:40 UTC
SELinux is preventing /sbin/setfiles from 'read' accesses on the directory /.

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

If you want to allow setfiles to have read access on the  directory
Then you need to change the label on /
Do
# semanage fcontext -a -t FILE_TYPE '/'
where FILE_TYPE is one of the following: devicekit_tmp_t, dbusd_etc_t, var_lib_t, var_run_t, domain, proc_net_t, var_log_t, sysctl_crypto_t, net_conf_t, inotifyfs_t, sysctl_kernel_t, abrt_t, hald_var_run_t, lib_t, devicekit_var_log_t, root_t, udev_var_run_t, usr_t, devicekit_power_t, device_t, etc_t, devicekit_var_lib_t, devicekit_var_run_t, textrel_shlib_t, bin_t, sysctl_fs_t, boot_t, sysctl_vm_t, cert_t, tmp_t, usr_t, device_t, locale_t, etc_t, proc_t, sysfs_t, config_home_t, var_run_t, nscd_var_run_t. 
Then execute: 
restorecon -v '/'


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

If you believe that setfiles should be allowed read access on the  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 restorecon /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:devicekit_power_t:s0-s0:c0.c1023
Target Context                system_u:object_r:mnt_t:s0
Target Objects                / [ dir ]
Source                        restorecon
Source Path                   /sbin/setfiles
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           policycoreutils-2.0.86-9.fc16
Target RPM Packages           filesystem-2.4.42-1.fc16
Policy RPM                    selinux-policy-3.9.16-24.fc16
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.39-1.fc16.x86_64
                              #1 SMP Sat May 21 02:34:01 UTC 2011 x86_64 x86_64
Alert Count                   10
First Seen                    Sat 28 May 2011 09:52:26 AM EDT
Last Seen                     Fri 03 Jun 2011 08:41:02 AM EDT
Local ID                      9c16186e-7324-4559-9f81-3e61c7e334f8

Raw Audit Messages
type=AVC msg=audit(1307104862.673:71): avc:  denied  { read } for  pid=1959 comm="restorecon" name="/" dev=dm-0 ino=2 scontext=system_u:system_r:devicekit_power_t:s0-s0:c0.c1023 tcontext=system_u:object_r:mnt_t:s0 tclass=dir


type=SYSCALL msg=audit(1307104862.673:71): arch=x86_64 syscall=open success=yes exit=EIO a0=7f5a4ca64cb3 a1=0 a2=0 a3=7fff6591f9f0 items=0 ppid=1947 pid=1959 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=restorecon exe=/sbin/setfiles subj=system_u:system_r:devicekit_power_t:s0-s0:c0.c1023 key=(null)

Hash: restorecon,devicekit_power_t,mnt_t,dir,read

audit2allow

#============= devicekit_power_t ==============
allow devicekit_power_t mnt_t:dir read;

audit2allow -R

#============= devicekit_power_t ==============
allow devicekit_power_t mnt_t:dir read;

Comment 1 Daniel Walsh 2011-06-03 15:50:47 UTC
I have no idea why devicekit_power_t to would running restorecon on /mnt, but I will add dontaudit.


Note You need to log in before you can comment on or make changes to this bug.