Bug 909547 - SELinux is preventing /usr/bin/python2.7 from 'name_connect' accesses on the tcp_socket .
Summary: SELinux is preventing /usr/bin/python2.7 from 'name_connect' accesses on the ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 18
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:e52ab1477ec8a1a161d0688200c...
: 909548 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-09 10:08 UTC by Niki Guldbrand
Modified: 2013-10-25 12:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-25 12:46:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 909539 0 unspecified CLOSED SELinux is preventing /usr/bin/python2.7 from 'name_connect' accesses on the tcp_socket . 2021-02-22 00:41:40 UTC

Internal Links: 909539

Description Niki Guldbrand 2013-02-09 10:08:04 UTC
Description of problem:
Trying to connect glance to a PostgreSQL backend
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 glance-api /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:glance_api_t:s0
Target Context                system_u:object_r:postgresql_port_t:s0
Target Objects                 [ tcp_socket ]
Source                        glance-api
Source Path                   /usr/bin/python2.7
Port                          5432
Host                          (removed)
Source RPM Packages           python-2.7.3-13.fc18.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.11.1-74.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.7.5-201.fc18.x86_64 #1 SMP Mon
                              Jan 28 19:54:41 UTC 2013 x86_64 x86_64
Alert Count                   80
First Seen                    2013-02-09 11:08:48 CET
Last Seen                     2013-02-09 11:10:29 CET
Local ID                      ec22854d-f36f-49d8-9e45-15456a01e1ba

Raw Audit Messages
type=AVC msg=audit(1360404629.305:1131): avc:  denied  { name_connect } for  pid=16118 comm="glance-api" dest=5432 scontext=system_u:system_r:glance_api_t:s0 tcontext=system_u:object_r:postgresql_port_t:s0 tclass=tcp_socket


type=SYSCALL msg=audit(1360404629.305:1131): arch=x86_64 syscall=connect success=no exit=EACCES a0=5 a1=2e2c7d0 a2=10 a3=7fff1f8f8fa4 items=0 ppid=14955 pid=16118 auid=4294967295 uid=161 gid=161 euid=161 suid=161 fsuid=161 egid=161 sgid=161 fsgid=161 ses=4294967295 tty=(none) comm=glance-api exe=/usr/bin/python2.7 subj=system_u:system_r:glance_api_t:s0 key=(null)

Hash: glance-api,glance_api_t,postgresql_port_t,tcp_socket,name_connect

audit2allow

#============= glance_api_t ==============
allow glance_api_t postgresql_port_t:tcp_socket name_connect;

audit2allow -R

#============= glance_api_t ==============
allow glance_api_t postgresql_port_t:tcp_socket name_connect;


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

Comment 1 Miroslav Grepl 2013-02-11 11:42:44 UTC
*** Bug 909548 has been marked as a duplicate of this bug. ***

Comment 2 Miroslav Grepl 2013-02-11 12:14:50 UTC
Fixed in selinux-policy-3.11.1-77.fc18


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