Bug 909539 - 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:4c7c3cbcdfe4ab96e71d7516081...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-09 09:24 UTC by Niki Guldbrand
Modified: 2013-02-18 06:57 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-18 06:57:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 909537 0 unspecified CLOSED SELinux is preventing /usr/bin/python2.7 from using the 'setsched' accesses on a process. 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 909547 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
Red Hat Bugzilla 909548 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
Red Hat Bugzilla 909549 0 unspecified CLOSED SELinux is preventing /usr/bin/python2.7 from using the 'signal' accesses on a process. 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 909557 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: 909537 909547 909548 909549 909557

Description Niki Guldbrand 2013-02-09 09:24:14 UTC
Description of problem:
I'm trying to configure Openstack's keystone service with a PostgreSQL backend, but i'm not allowed.
I have looked at the boolean's but couldn't find any that matched this (based on the descriptions of them),
Could this be added as a boolean where you can enable this ?
As the default seems to be a mysql DB, but Postgres usage is documented in Openstack docs
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 keystone-all /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:keystone_t:s0
Target Context                system_u:object_r:postgresql_port_t:s0
Target Objects                 [ tcp_socket ]
Source                        keystone-all
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                   58
First Seen                    2013-02-09 09:16:38 CET
Last Seen                     2013-02-09 10:16:09 CET
Local ID                      d2e7e962-02d7-4fba-b3e1-0bade1accbaa

Raw Audit Messages
type=AVC msg=audit(1360401369.60:941): avc:  denied  { name_connect } for  pid=13064 comm="keystone-all" dest=5432 scontext=system_u:system_r:keystone_t:s0 tcontext=system_u:object_r:postgresql_port_t:s0 tclass=tcp_socket


type=SYSCALL msg=audit(1360401369.60:941): arch=x86_64 syscall=connect success=no exit=EACCES a0=8 a1=2a9b6e0 a2=10 a3=7fff68da7494 items=0 ppid=1 pid=13064 auid=4294967295 uid=163 gid=163 euid=163 suid=163 fsuid=163 egid=163 sgid=163 fsgid=163 ses=4294967295 tty=(none) comm=keystone-all exe=/usr/bin/python2.7 subj=system_u:system_r:keystone_t:s0 key=(null)

Hash: keystone-all,keystone_t,postgresql_port_t,tcp_socket,name_connect

audit2allow

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

audit2allow -R

#============= keystone_t ==============
allow keystone_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 12:20:38 UTC
commit e5d32008ee022a561a9b50d038a4737ab82ec21d
Author: Miroslav Grepl <mgrepl>
Date:   Mon Feb 11 13:19:30 2013 +0100

    Allow keystone to connect to postgresql

Comment 2 Fedora Update System 2013-02-15 22:43:39 UTC
selinux-policy-3.11.1-78.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/selinux-policy-3.11.1-78.fc18

Comment 3 Fedora Update System 2013-02-17 03:23:17 UTC
Package selinux-policy-3.11.1-78.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-78.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-2588/selinux-policy-3.11.1-78.fc18
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-02-18 06:57:31 UTC
selinux-policy-3.11.1-78.fc18 has been pushed to the Fedora 18 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.