Bug 914836

Summary: SELinux is preventing /usr/bin/python2.7 from 'name_connect' accesses on the tcp_socket .
Product: [Fedora] Fedora Reporter: Jeff Peeler <jpeeler>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:55adb54305af29405b9b90ed4c5759486b09a171f459fd65fe1da2f4b69be417
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-03 22:42:04 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 Jeff Peeler 2013-02-22 22:35:53 UTC
Description of problem:
Started quantum-server
SELinux is preventing /usr/bin/python2.7 from 'name_connect' accesses on the tcp_socket .

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

If you believe that python2.7 should be allowed name_connect access on the  tcp_socket 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 python /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:quantum_t:s0
Target Context                system_u:object_r:amqp_port_t:s0
Target Objects                 [ tcp_socket ]
Source                        python
Source Path                   /usr/bin/python2.7
Port                          5672
Host                          (removed)
Source RPM Packages           python-2.7.3-13.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-79.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.7.9-201.fc18.x86_64 #1 SMP Mon
                              Feb 18 21:07:56 UTC 2013 x86_64 x86_64
Alert Count                   6
First Seen                    2013-02-22 17:34:08 EST
Last Seen                     2013-02-22 17:34:39 EST
Local ID                      6f93dae9-e222-4745-8671-1251aa5289ea

Raw Audit Messages
type=AVC msg=audit(1361572479.192:989): avc:  denied  { name_connect } for  pid=14801 comm="python" dest=5672 scontext=system_u:system_r:quantum_t:s0 tcontext=system_u:object_r:amqp_port_t:s0 tclass=tcp_socket


type=SYSCALL msg=audit(1361572479.192:989): arch=x86_64 syscall=connect success=no exit=EACCES a0=8 a1=7fff2ec77d90 a2=10 a3=1 items=0 ppid=1 pid=14801 auid=4294967295 uid=164 gid=164 euid=164 suid=164 fsuid=164 egid=164 sgid=164 fsgid=164 ses=4294967295 tty=(none) comm=python exe=/usr/bin/python2.7 subj=system_u:system_r:quantum_t:s0 key=(null)

Hash: python,quantum_t,amqp_port_t,tcp_socket,name_connect

audit2allow

#============= quantum_t ==============
allow quantum_t amqp_port_t:tcp_socket name_connect;

audit2allow -R

#============= quantum_t ==============
allow quantum_t amqp_port_t:tcp_socket name_connect;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.7.9-201.fc18.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2013-02-25 12:14:01 UTC
Added.

commit debc9abe2b4a20dab403e9fe43c23531c3a6263e
Author: Miroslav Grepl <mgrepl>
Date:   Mon Feb 25 13:12:55 2013 +0100

    Allow quantum to connect to amqp port

Comment 2 Fedora Update System 2013-03-01 13:04:13 UTC
selinux-policy-3.11.1-82.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-82.fc18

Comment 3 Fedora Update System 2013-03-02 20:14:45 UTC
Package selinux-policy-3.11.1-82.fc18:
* should fix your issue,
* was pushed to the Fedora 18 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.11.1-82.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-3309/selinux-policy-3.11.1-82.fc18
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-03-03 22:42:06 UTC
selinux-policy-3.11.1-82.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.