Bug 1060812

Summary: SELinux is preventing /usr/lib64/erlang/erts-5.10.4/bin/beam.smp from 'open' accesses on the file /run/rabbitmq/pid.
Product: [Fedora] Fedora Reporter: Daniel Ashton <jdashton>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: dominick.grift, dwalsh, lvrabec, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:05ae412b7be28999989ba4b6848717b49adc7887fea1f58291b1df1cdbd45236
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-04 10:02:51 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 Daniel Ashton 2014-02-03 16:37:39 UTC
Description of problem:
Attempted to start RabbitMQ service
SELinux is preventing /usr/lib64/erlang/erts-5.10.4/bin/beam.smp from 'open' accesses on the file /run/rabbitmq/pid.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/run/rabbitmq/pid default label should be rabbitmq_var_run_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /run/rabbitmq/pid

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that beam.smp should be allowed open access on the pid 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 beam.smp /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:rabbitmq_beam_t:s0
Target Context                system_u:object_r:initrc_var_run_t:s0
Target Objects                /run/rabbitmq/pid [ file ]
Source                        beam.smp
Source Path                   /usr/lib64/erlang/erts-5.10.4/bin/beam.smp
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           erlang-erts-R16B-03.1.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-119.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.12.9-301.fc20.x86_64 #1 SMP Wed
                              Jan 29 15:56:22 UTC 2014 x86_64 x86_64
Alert Count                   1
First Seen                    2014-02-03 11:34:06 EST
Last Seen                     2014-02-03 11:34:06 EST
Local ID                      1fb13034-f4a4-44c6-9816-4c0346a651e5

Raw Audit Messages
type=AVC msg=audit(1391445246.486:569): avc:  denied  { open } for  pid=3747 comm="beam.smp" path="/run/rabbitmq/pid" dev="tmpfs" ino=34812 scontext=system_u:system_r:rabbitmq_beam_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file


type=SYSCALL msg=audit(1391445246.486:569): arch=x86_64 syscall=open success=no exit=EACCES a0=7feba0101a80 a1=0 a2=1b6 a3=1 items=0 ppid=3706 pid=3747 auid=4294967295 uid=986 gid=983 euid=986 suid=986 fsuid=986 egid=983 sgid=983 fsgid=983 ses=4294967295 tty=(none) comm=beam.smp exe=/usr/lib64/erlang/erts-5.10.4/bin/beam.smp subj=system_u:system_r:rabbitmq_beam_t:s0 key=(null)

Hash: beam.smp,rabbitmq_beam_t,initrc_var_run_t,file,open

Additional info:
reporter:       libreport-2.1.11
hashmarkername: setroubleshoot
kernel:         3.12.9-301.fc20.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2014-02-04 10:02:51 UTC

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