Bug 1002689 - SELinux is preventing /usr/sbin/asterisk from read, write access on the file cdr.db.
Summary: SELinux is preventing /usr/sbin/asterisk from read, write access on the file ...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 19
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
Whiteboard: abrt_hash:e802c0d2408d92008008e9f1e94...
: 1002688 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2013-08-29 17:43 UTC by Jared Smith
Modified: 2013-09-08 00:36 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.12.1-74.1.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-09-08 00:36:50 UTC
Type: ---

Attachments (Terms of Use)

Description Jared Smith 2013-08-29 17:43:14 UTC
Description of problem:
Installed Asterisk (1.8 branch) from source, then started the service with SELinux in enforcing mode.
SELinux is preventing /usr/sbin/asterisk from read, write access on the file cdr.db.

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

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

Additional Information:
Source Context                system_u:system_r:asterisk_t:s0
Target Context                system_u:object_r:asterisk_log_t:s0
Target Objects                cdr.db [ file ]
Source                        asterisk
Source Path                   /usr/sbin/asterisk
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-73.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.10.9-200.fc19.x86_64 #1 SMP Wed
                              Aug 21 19:27:58 UTC 2013 x86_64 x86_64
Alert Count                   2
First Seen                    2013-08-29 13:40:36 EDT
Last Seen                     2013-08-29 13:41:05 EDT
Local ID                      a36e6a8f-c2ce-4e81-87d1-f064ca0d3f3f

Raw Audit Messages
type=AVC msg=audit(1377798065.569:592): avc:  denied  { read write } for  pid=25743 comm="asterisk" name="cdr.db" dev="dm-2" ino=2499455 scontext=system_u:system_r:asterisk_t:s0 tcontext=system_u:object_r:asterisk_log_t:s0 tclass=file

type=SYSCALL msg=audit(1377798065.569:592): arch=x86_64 syscall=open success=no exit=EACCES a0=23a3640 a1=42 a2=1a4 a3=1 items=0 ppid=25741 pid=25743 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=asterisk exe=/usr/sbin/asterisk subj=system_u:system_r:asterisk_t:s0 key=(null)

Hash: asterisk,asterisk_t,asterisk_log_t,file,read,write

Additional info:
reporter:       libreport-2.1.6
hashmarkername: setroubleshoot
kernel:         3.10.9-200.fc19.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2013-08-30 12:44:37 UTC
*** Bug 1002688 has been marked as a duplicate of this bug. ***

Comment 6 Miroslav Grepl 2013-09-03 09:37:33 UTC

Comment 7 Fedora Update System 2013-09-03 19:57:20 UTC
selinux-policy-3.12.1-74.1.fc19 has been submitted as an update for Fedora 19.

Comment 8 Fedora Update System 2013-09-05 01:38:50 UTC
Package selinux-policy-3.12.1-74.1.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-74.1.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2013-09-08 00:36:50 UTC
selinux-policy-3.12.1-74.1.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.