Bug 837330

Summary: SELinux is preventing /usr/bin/python2.7 from 'name_connect' accesses on the tcp_socket .
Product: [Fedora] Fedora Reporter: Sandro Mathys <sandro>
Component: openstack-glanceAssignee: Mark McLoughlin <markmc>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: akscram, alexander.sakhnov, apevec, asalkeld, bfilippov, breu, dominick.grift, dwalsh, Jan.van.Eldik, jonathansteffan, jose.castro.leon, markmc, matt_domsch, mgrepl, mlvov, nsantos, p, rbryant, rkukura
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:813f5a0b8f0716aa851387fbe570e0d675050b283478e144e76f28d9b31d9734
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-01 03:33:22 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 Sandro Mathys 2012-07-03 13:23:59 UTC
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.4-3.fc17.x86_64
time:           Tue 03 Jul 2012 03:23:44 PM CEST

description:
: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:http_port_t:s0
:Target Objects                 [ tcp_socket ]
:Source                        glance-api
:Source Path                   /usr/bin/python2.7
:Port                          80
:Host                          (removed)
:Source RPM Packages           python-2.7.3-6.fc17.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-134.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.4.4-3.fc17.x86_64
:                              #1 SMP Tue Jun 26 20:54:56 UTC 2012 x86_64 x86_64
:Alert Count                   3
:First Seen                    Tue 03 Jul 2012 03:20:58 PM CEST
:Last Seen                     Tue 03 Jul 2012 03:20:58 PM CEST
:Local ID                      cca566a8-8377-4f6a-8db6-af2010d96dda
:
:Raw Audit Messages
:type=AVC msg=audit(1341321658.389:1717): avc:  denied  { name_connect } for  pid=11255 comm="glance-api" dest=80 scontext=system_u:system_r:glance_api_t:s0 tcontext=system_u:object_r:http_port_t:s0 tclass=tcp_socket
:
:
:type=SYSCALL msg=audit(1341321658.389:1717): arch=x86_64 syscall=connect success=no exit=EACCES a0=7 a1=7fff9ee1d920 a2=1c a3=a items=0 ppid=1 pid=11255 auid=4294967295 uid=161 gid=161 euid=161 suid=161 fsuid=161 egid=161 sgid=161 fsgid=161 tty=(none) ses=4294967295 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,http_port_t,tcp_socket,name_connect
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:

Comment 1 Sandro Mathys 2012-07-03 13:25:00 UTC
This happened when trying:
glance add name=f16-jeos is_public=true disk_format=qcow2 container_format=bare \
      copy_from=http://berrange.fedorapeople.org/images/2012-02-29/f16-x86_64-openstack-sda.qcow2
ad described on:
https://fedoraproject.org/wiki/Getting_started_with_OpenStack_on_Fedora_17

Comment 2 Daniel Walsh 2012-07-18 21:05:49 UTC
Should this be standard or should we add a boolean?

Comment 3 Fedora End Of Life 2013-07-04 00:08:42 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2013-08-01 03:33:30 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.