Bug 788581 - SELinux is preventing /usr/bin/python from 'write' accesses on the None /etc/sysconfig/system-config-firewall.old.
Summary: SELinux is preventing /usr/bin/python from 'write' accesses on the None /etc/...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 16
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:e36fce3bff4e9c2375007b4c16d...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-08 14:11 UTC by dkfedorabugs
Modified: 2012-03-19 14:30 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-15 16:38:51 UTC
Type: ---


Attachments (Terms of Use)

Description dkfedorabugs 2012-02-08 14:11:31 UTC
libreport version: 2.0.8
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.2.3-2.fc16.x86_64
reason:         SELinux is preventing /usr/bin/python from 'write' accesses on the None /etc/sysconfig/system-config-firewall.old.
time:           Wed 08 Feb 2012 10:10:06 PM MYT

description:
:SELinux is preventing /usr/bin/python from 'write' accesses on the None /etc/sysconfig/system-config-firewall.old.
:
:*****  Plugin catchall (100. confidence) suggests  ***************************
:
:If you believe that python should be allowed write access on the system-config-firewall.old <Unknown> 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 system-config-f /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:firewallgui_t:s0-s0:c0.c1023
:Target Context                unconfined_u:object_r:etc_t:s0
:Target Objects                /etc/sysconfig/system-config-firewall.old [ None ]
:Source                        system-config-f
:Source Path                   /usr/bin/python
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           python-2.7.2-5.2.fc16.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-75.fc16.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.2.3-2.fc16.x86_64 #1
:                              SMP Fri Feb 3 20:08:08 UTC 2012 x86_64 x86_64
:Alert Count                   4
:First Seen                    Wed 08 Feb 2012 10:06:02 PM MYT
:Last Seen                     Wed 08 Feb 2012 10:08:47 PM MYT
:Local ID                      e6ca8ec0-f2aa-4278-82b0-023b00eed4eb
:
:Raw Audit Messages
:type=AVC msg=audit(1328710127.614:212): avc:  denied  { write } for  pid=18631 comm="system-config-f" name="system-config-firewall.old" dev=dm-1 ino=4457955 scontext=system_u:system_r:firewallgui_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:etc_t:s0 tclass=filenode=(removed) type=SYSCALL msg=audit(1328710127.614:212): arch=c000003e syscall=2 success=no exit=-13 a0=1fa0a50 a1=241 a2=1b6 a3=238 items=0 ppid=1 pid=18631 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="system-config-f" exe="/usr/bin/python" subj=system_u:system_r:firewallgui_t:s0-s0:c0.c1023 key=(null)
:
:
:Hash: system-config-f,firewallgui_t,etc_t,None,write
:
:audit2allow
:
:
:audit2allow -R
:
:

Comment 1 Daniel Walsh 2012-02-08 19:50:25 UTC
Why is this gui app trying to write to /etc?

Comment 2 Miroslav Grepl 2012-02-09 08:50:09 UTC
This is what s-c-f does:

files_manage_system_conf_files(firewallgui_t)
files_etc_filetrans_system_conf(firewallgui_t)

But the problem is that the "system-config-firewall.old" file was created with bad label. 

Thomas, 
how is "/etc/sysconfig/system-config-firewall.old" created?

Comment 3 Miroslav Grepl 2012-02-09 08:51:59 UTC
Actually,
I would say that

/etc/sysconfig/system-config-firewall

is mislabeled and this is reason why also *.old is mislabeled.

Reporter,
what does 

$ ls -Z /etc/sysconfig/system-config-firewall

Comment 4 Thomas Woerner 2012-02-09 09:07:36 UTC
The D-BUS backend does, not the GUI. But the GUI is using the D-BUS backend.

Reassigning to selinux-policy.

Comment 5 Thomas Woerner 2012-02-09 09:18:43 UTC
/etc/sysconfig/system-config-firewall.old is a copy of /etc/sysconfig/system-config-firewall

Comment 6 Miroslav Grepl 2012-02-09 09:22:08 UTC
Yeap, I thought it.

Comment 7 Miroslav Grepl 2012-03-15 16:38:51 UTC
I think this will not happen again and this is an labeling issue.

$ restorecon -R -v /etc/sysconfig/system-config-firewall*

should fix this issue.

Comment 8 dkfedorabugs 2012-03-17 15:52:30 UTC
Sorry but it didn't fix it.

Comment 9 Miroslav Grepl 2012-03-19 14:30:30 UTC
ok what does

$ ls -Z /etc/sysconfig/system-config-firewall*


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