Bug 994629 - SELinux is preventing /usr/sbin/afsd from 'getattr' accesses on the file /etc/openafs/cacheinfo.
SELinux is preventing /usr/sbin/afsd from 'getattr' accesses on the file /etc...
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-08-07 12:16 EDT by Ken Dreyer
Modified: 2013-08-21 20:53 EDT (History)
4 users (show)

See Also:
Fixed In Version: selinux-policy-3.12.1-71.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-08-21 20:53:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ken Dreyer 2013-08-07 12:16:22 EDT
Description of problem:
I'm using the RPM Fusion openafs-client package. The service fails to start, because SELinux prevents afsd from reading the cacheinfo file. Once I put SELinux into permissive mode, I am able to start the openafs-client service.
SELinux is preventing /usr/sbin/afsd from 'getattr' accesses on the file /etc/openafs/cacheinfo.

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

If you believe that afsd should be allowed getattr access on the cacheinfo file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
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:afs_config_t:s0
Target Objects                /etc/openafs/cacheinfo [ file ]
Source                        afsd
Source Path                   /usr/sbin/afsd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           openafs-client-1.6.4-1.fc20.x86_64
Target RPM Packages           openafs-client-1.6.4-1.fc20.x86_64
Policy RPM                    selinux-policy-3.12.1-66.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.10.3-300.fc19.x86_64 #1 SMP Fri
                              Jul 26 00:00:58 UTC 2013 x86_64 x86_64
Alert Count                   4
First Seen                    2013-07-26 21:44:31 EDT
Last Seen                     2013-08-07 12:05:21 EDT
Local ID                      1bfe1b78-345a-4532-97a0-82237f2059c0

Raw Audit Messages
type=AVC msg=audit(1375891521.349:499): avc:  denied  { getattr } for  pid=1446 comm="afsd" path="/etc/openafs/cacheinfo" dev="dm-0" ino=658385 scontext=system_u:system_r:afs_t:s0 tcontext=system_u:object_r:afs_config_t:s0 tclass=file

type=SYSCALL msg=audit(1375891521.349:499): arch=x86_64 syscall=fstat success=yes exit=0 a0=3 a1=7fffe35cca30 a2=7fffe35cca30 a3=1 items=0 ppid=1 pid=1446 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=afsd exe=/usr/sbin/afsd subj=system_u:system_r:afs_t:s0 key=(null)

Hash: afsd,afs_t,afs_config_t,file,getattr

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.3-300.fc19.x86_64
type:           libreport
Comment 1 Ken Dreyer 2013-08-07 12:17:31 EDT
Note that this affects Rawhide as well as Fedora 19. I have a user at RPM Fusion who is on F19 and seeing this same problem.
Comment 2 Ken Dreyer 2013-08-07 12:17:48 EDT
RPM Fusion bug: https://bugzilla.rpmfusion.org/show_bug.cgi?id=2912
Comment 3 Ken Dreyer 2013-08-07 12:23:42 EDT
I should mention that there is a second AVC denial for "read" for afsd as well on cacheinfo.
Comment 4 Daniel Walsh 2013-08-07 14:02:06 EDT
6f6bd18652b5d3afdba301b1b69ece514393f7f2 fixes this in git. for Rawhide.
Comment 5 Fedora Update System 2013-08-20 04:26:45 EDT
selinux-policy-3.12.1-71.fc19 has been submitted as an update for Fedora 19.
Comment 6 Fedora Update System 2013-08-20 20:15:46 EDT
Package selinux-policy-3.12.1-71.fc19:
* should fix your issue,
* was pushed to the Fedora 19 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.12.1-71.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2013-08-21 20:53:38 EDT
selinux-policy-3.12.1-71.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

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