Bug 1010718 - SELinux is preventing /usr/sbin/lircd from 'read' accesses on the file lircd.conf.
SELinux is preventing /usr/sbin/lircd from 'read' accesses on the file lircd....
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
abrt_hash:c47335e68d08447575fe7b21681...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-22 14:22 EDT by Santi
Modified: 2013-09-24 03:33 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-24 03:33:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Santi 2013-09-22 14:22:47 EDT
Description of problem:
SELinux is preventing /usr/sbin/lircd from 'read' accesses on the file lircd.conf.

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

If cree que de manera predeterminada, lircd debería permitir acceso read sobre  lircd.conf file.     
Then debería reportar esto como un error.
Puede generar un módulo de política local para permitir este acceso.
Do
permita el acceso momentáneamente executando:
# grep lircd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:lircd_t:s0
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                lircd.conf [ file ]
Source                        lircd
Source Path                   /usr/sbin/lircd
Port                          <Desconocido>
Host                          (removed)
Source RPM Packages           lirc-0.9.0-11.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-74.3.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.11.1-200.fc19.x86_64 #1 SMP Sat
                              Sep 14 15:04:51 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-09-22 19:51:58 CEST
Last Seen                     2013-09-22 19:57:05 CEST
Local ID                      74ef4a80-7909-4272-8911-f923ef584719

Raw Audit Messages
type=AVC msg=audit(1379872625.718:109): avc:  denied  { read } for  pid=736 comm="lircd" name="lircd.conf" dev="sdb10" ino=795746 scontext=system_u:system_r:lircd_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file


type=SYSCALL msg=audit(1379872625.718:109): arch=x86_64 syscall=open success=no exit=EACCES a0=427fc8 a1=0 a2=1b6 a3=7fff682dd500 items=0 ppid=1 pid=736 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=lircd exe=/usr/sbin/lircd subj=system_u:system_r:lircd_t:s0 key=(null)

Hash: lircd,lircd_t,user_home_t,file,read

Additional info:
reporter:       libreport-2.1.7
hashmarkername: setroubleshoot
kernel:         3.11.1-200.fc19.x86_64
type:           libreport
Comment 1 Lukas Vrabec 2013-09-23 05:27:40 EDT
Hi, 

Where is located your lircd.conf file? Correct path should be '/etc/lirc/lircd.conf' 

If you have lircd.conf in "/etc/lirc/" what does: 
"$ ls -Z /etc/lirc/" ?
Comment 2 Daniel Walsh 2013-09-23 13:50:41 EDT
Most like restorecon -R -v /etc/lirc 

fixes the problem.

Looks like you created the file in your homedir and then mv'd it into /etc/lirc.
Comment 3 Santi 2013-09-23 15:57:41 EDT
You gessed it! The restorecon command solved the problem.

Thanks to all

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