Bug 809157

Summary: SELinux is preventing /bin/systemd-tmpfiles from getattr access on the sock_file /run/lirc/lircd.
Product: [Fedora] Fedora Reporter: DaveG <daveg>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 16CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-05 12:20:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description DaveG 2012-04-02 15:46:03 UTC
Manual submission - copy+paste...
Related to closed bug <https://bugzilla.redhat.com/show_bug.cgi?id=715178>?

SELinux is preventing /bin/systemd-tmpfiles from getattr access on the sock_file /run/lirc/lircd.

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

If you believe that systemd-tmpfiles should be allowed getattr access on the lircd sock_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-tmpfile /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_tmpfiles_t:s0
Target Context                system_u:object_r:lircd_var_run_t:s0
Target Objects                /run/lirc/lircd [ sock_file ]
Source                        systemd-tmpfile
Source Path                   /bin/systemd-tmpfiles
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           systemd-units-37-17.fc16.x86_64
Target RPM Packages           lirc-0.9.0-7.fc16.x86_64
Policy RPM                    selinux-policy-3.10.0-80.fc16.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux lister.localnet 3.3.0-8.fc16.x86_64 #1 SMP
                              Thu Mar 29 18:37:19 UTC 2012 x86_64 x86_64
Alert Count                   3
First Seen                    Sun 01 Apr 2012 13:21:07 BST
Last Seen                     Mon 02 Apr 2012 15:59:05 BST
Local ID                      2b00c8f4-e05d-40d0-a52b-8d4b073ba17e

Raw Audit Messages
type=AVC msg=audit(1333378745.412:343): avc:  denied  { getattr } for  pid=1601 comm="systemd-tmpfile" path="/run/lirc/lircd" dev="tmpfs" ino=26967 scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:object_r:lircd_var_run_t:s0 tclass=sock_file


type=SYSCALL msg=audit(1333378745.412:343): arch=x86_64 syscall=newfstatat success=no exit=EACCES a0=4 a1=12c931b a2=7fffaa1ba0e0 a3=100 items=0 ppid=1 pid=1601 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=systemd-tmpfile exe=/bin/systemd-tmpfiles subj=system_u:system_r:systemd_tmpfiles_t:s0 key=(null)

Hash: systemd-tmpfile,systemd_tmpfiles_t,lircd_var_run_t,sock_file,getattr

audit2allow

#============= systemd_tmpfiles_t ==============
allow systemd_tmpfiles_t lircd_var_run_t:sock_file getattr;

audit2allow -R

#============= systemd_tmpfiles_t ==============
allow systemd_tmpfiles_t lircd_var_run_t:sock_file getattr;

Comment 1 Miroslav Grepl 2012-04-05 12:20:28 UTC

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