Bug 710538

Summary: SELinux is preventing /usr/sbin/afsd from 'read' accesses on the lnk_file mtab.
Product: [Fedora] Fedora Reporter: Daniel Scott <dan>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:64761866d0b60ffd69a89e25d6e8e3401fa287c502903b9eeea8d6f5e1f4d062
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-03 20:31:31 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 Daniel Scott 2011-06-03 16:25:10 UTC
SELinux is preventing /usr/sbin/afsd from 'read' accesses on the lnk_file mtab.

*****  Plugin catchall (100. confidence) suggests  ***************************

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

Additional Information:
Source Context                system_u:system_r:afs_t:s0
Target Context                system_u:object_r:etc_runtime_t:s0
Target Objects                mtab [ lnk_file ]
Source                        afsd
Source Path                   /usr/sbin/afsd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           openafs-client-1.6.0-0.pre4.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-26.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.6-27.fc15.x86_64 #1
                              SMP Sun May 15 17:23:28 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Fri 03 Jun 2011 12:22:59 PM EDT
Last Seen                     Fri 03 Jun 2011 12:22:59 PM EDT
Local ID                      4ac81211-1582-4c5e-8291-31ae64eea4db

Raw Audit Messages
type=AVC msg=audit(1307118179.729:59): avc:  denied  { read } for  pid=2052 comm="afsd" name="mtab" dev=dm-0 ino=131079 scontext=system_u:system_r:afs_t:s0 tcontext=system_u:object_r:etc_runtime_t:s0 tclass=lnk_file


type=SYSCALL msg=audit(1307118179.729:59): arch=x86_64 syscall=open success=no exit=EACCES a0=423ba3 a1=442 a2=1b6 a3=7fff0e234ee0 items=0 ppid=2051 pid=2052 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=afsd exe=/usr/sbin/afsd subj=system_u:system_r:afs_t:s0 key=(null)

Hash: afsd,afs_t,etc_runtime_t,lnk_file,read

audit2allow

#============= afs_t ==============
#!!!! This avc is allowed in the current policy

allow afs_t etc_runtime_t:lnk_file read;

audit2allow -R

#============= afs_t ==============
#!!!! This avc is allowed in the current policy

allow afs_t etc_runtime_t:lnk_file read;

Comment 1 Daniel Walsh 2011-06-03 20:28:14 UTC
restorecon -v /etc/mtab

Does this fix the label?

Otherwise try 

restorecon -R -v /etc

Comment 2 Daniel Walsh 2011-06-03 20:31:31 UTC
Fixed in Rawhide.