Bug 885249 - SELinux is preventing /usr/bin/python2.7 from 'write' accesses on the directory /var/lib/rpm.
Summary: SELinux is preventing /usr/bin/python2.7 from 'write' accesses on the directo...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: subscription-manager
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Devan Goodwin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:b5f9ac9fda3450159624c0b71ea...
Depends On:
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2012-12-07 22:32 UTC by Lanny Bland
Modified: 2013-07-31 23:51 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-31 23:51:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Lanny Bland 2012-12-07 22:32:27 UTC
Description of problem:
SELinux is preventing /usr/bin/python2.7 from 'write' accesses on the directory /var/lib/rpm.

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

If you believe that python2.7 should be allowed write access on the rpm directory 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 rhsmcertd-worke /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:rhsmcertd_t:s0
Target Context                system_u:object_r:rpm_var_lib_t:s0
Target Objects                /var/lib/rpm [ dir ]
Source                        rhsmcertd-worke
Source Path                   /usr/bin/python2.7
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.7.3-7.2.fc17.x86_64
Target RPM Packages           rpm-4.9.1.3-7.fc17.x86_64
Policy RPM                    selinux-policy-3.10.0-161.fc17.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.6.9-2.fc17.x86_64 #1 SMP Tue Dec
                              4 13:26:04 UTC 2012 x86_64 x86_64
Alert Count                   1
First Seen                    2012-12-07 16:24:42 CST
Last Seen                     2012-12-07 16:24:42 CST
Local ID                      72aa89fe-ab9d-451a-a0f2-068a8d046295

Raw Audit Messages
type=AVC msg=audit(1354919082.52:62): avc:  denied  { write } for  pid=1649 comm="rhsmcertd-worke" name="rpm" dev="dm-1" ino=16 scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:rpm_var_lib_t:s0 tclass=dir


type=AVC msg=audit(1354919082.52:62): avc:  denied  { add_name } for  pid=1649 comm="rhsmcertd-worke" name="__db.001" scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:rpm_var_lib_t:s0 tclass=dir


type=AVC msg=audit(1354919082.52:62): avc:  denied  { create } for  pid=1649 comm="rhsmcertd-worke" name="__db.001" scontext=system_u:system_r:rhsmcertd_t:s0 tcontext=system_u:object_r:rpm_var_lib_t:s0 tclass=file


type=SYSCALL msg=audit(1354919082.52:62): arch=x86_64 syscall=open success=yes exit=EIO a0=11641b0 a1=c2 a2=1a4 a3=16 items=0 ppid=795 pid=1649 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=rhsmcertd-worke exe=/usr/bin/python2.7 subj=system_u:system_r:rhsmcertd_t:s0 key=(null)

Hash: rhsmcertd-worke,rhsmcertd_t,rpm_var_lib_t,dir,write

audit2allow

#============= rhsmcertd_t ==============
#!!!! The source type 'rhsmcertd_t' can write to a 'dir' of the following types:
# var_lock_t, rhsmcertd_log_t, rhsmcertd_lock_t, rhsmcertd_var_lib_t, rhsmcertd_var_run_t, var_run_t, root_t

allow rhsmcertd_t rpm_var_lib_t:dir { write add_name };
allow rhsmcertd_t rpm_var_lib_t:file create;

audit2allow -R

#============= rhsmcertd_t ==============
#!!!! The source type 'rhsmcertd_t' can write to a 'dir' of the following types:
# var_lock_t, rhsmcertd_log_t, rhsmcertd_lock_t, rhsmcertd_var_lib_t, rhsmcertd_var_run_t, var_run_t, root_t

allow rhsmcertd_t rpm_var_lib_t:dir { write add_name };
allow rhsmcertd_t rpm_var_lib_t:file create;


Additional info:
hashmarkername: setroubleshoot
kernel:         3.6.9-2.fc17.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2012-12-10 08:53:50 UTC
I believe this is not needed.

Comment 4 Fedora End Of Life 2013-07-03 22:10:43 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 5 Fedora End Of Life 2013-07-31 23:51:50 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.


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