Bug 809736 - SELinux is preventing /usr/bin/python from 'write' accesses on the file /etc/dhcp/manager-settings.conf.
Summary: SELinux is preventing /usr/bin/python from 'write' accesses on the file /etc/...
Keywords:
Status: CLOSED DUPLICATE of bug 754412
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:1c22b3175af573f873c3f163295...
: 809737 809739 809740 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-04 08:52 UTC by klement.sekera
Modified: 2012-04-22 11:45 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-22 11:45:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description klement.sekera 2012-04-04 08:52:48 UTC
libreport version: 2.0.8
executable:     /usr/bin/python
hashmarkername: setroubleshoot
kernel:         3.3.0-8.fc16.x86_64
reason:         SELinux is preventing /usr/bin/python from 'write' accesses on the file /etc/dhcp/manager-settings.conf.
time:           Wed 04 Apr 2012 11:51:48 AM CEST

description:
:SELinux is preventing /usr/bin/python from 'write' accesses on the file /etc/dhcp/manager-settings.conf.
:
:*****  Plugin catchall_labels (83.8 confidence) suggests  ********************
:
:If you want to allow python to have write access on the manager-settings.conf file
:Then you need to change the label on /etc/dhcp/manager-settings.conf
:Do
:# semanage fcontext -a -t FILE_TYPE '/etc/dhcp/manager-settings.conf'
:where FILE_TYPE is one of the following: NetworkManager_var_lib_t, NetworkManager_var_run_t, user_cron_spool_t, net_conf_t, pppd_var_run_t, NetworkManager_t, afs_cache_t, sysfs_t, puppet_tmp_t, named_cache_t, NetworkManager_etc_rw_t, NetworkManager_tmp_t, NetworkManager_log_t, sysctl_net_t, root_t. 
:Then execute: 
:restorecon -v '/etc/dhcp/manager-settings.conf'
:
:
:*****  Plugin catchall (17.1 confidence) suggests  ***************************
:
:If you believe that python should be allowed write access on the manager-settings.conf file 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 wicd /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:NetworkManager_t:s0
:Target Context                unconfined_u:object_r:etc_t:s0
:Target Objects                /etc/dhcp/manager-settings.conf [ file ]
:Source                        wicd
: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-80.fc16.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.3.0-8.fc16.x86_64 #1 SMP
:                              Thu Mar 29 18:37:19 UTC 2012 x86_64 x86_64
:Alert Count                   1
:First Seen                    Wed 04 Apr 2012 11:51:21 AM CEST
:Last Seen                     Wed 04 Apr 2012 11:51:21 AM CEST
:Local ID                      476409f3-15aa-4a7e-8f4f-dac24028e3b2
:
:Raw Audit Messages
:type=AVC msg=audit(1333533081.811:87): avc:  denied  { write } for  pid=2342 comm="wicd" name="manager-settings.conf" dev="sda2" ino=26588 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=unconfined_u:object_r:etc_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1333533081.811:87): arch=x86_64 syscall=open success=no exit=EACCES a0=15a9d30 a1=241 a2=1b6 a3=238 items=0 ppid=1 pid=2342 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=wicd exe=/usr/bin/python subj=system_u:system_r:NetworkManager_t:s0 key=(null)
:
:Hash: wicd,NetworkManager_t,etc_t,file,write
:
:audit2allow
:
:#============= NetworkManager_t ==============
:allow NetworkManager_t etc_t:file write;
:
:audit2allow -R
:
:#============= NetworkManager_t ==============
:allow NetworkManager_t etc_t:file write;
:

Comment 1 Miroslav Grepl 2012-04-04 09:11:24 UTC
*** Bug 809737 has been marked as a duplicate of this bug. ***

Comment 2 Miroslav Grepl 2012-04-04 09:11:28 UTC
*** Bug 809739 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2012-04-04 09:11:33 UTC
*** Bug 809740 has been marked as a duplicate of this bug. ***

Comment 4 Daniel Walsh 2012-04-05 16:00:41 UTC
Do we need to label /etc/dhcp/manager-settings.conf
 as net_conf_t?

chcon -t net_conf_t /etc/dhcp/manager-settings.conf

Will solve your problem

Comment 5 Miroslav Grepl 2012-04-06 06:06:57 UTC
What does 

$ rpm -qf /etc/dhcp/manager-settings.conf

Comment 6 klement.sekera 2012-04-10 09:23:28 UTC
$ sudo rpm -qf /etc/dhcp/manager-settings.conf
file /etc/dhcp/manager-settings.conf is not owned by any package

Comment 7 Miroslav Grepl 2012-04-10 09:52:30 UTC
How is this file created?

Comment 8 klement.sekera 2012-04-10 10:00:03 UTC
In my config, after countless problems with wifi & network manager, I removed the Network Manager and installed wicd.

Since I can see some wicd related info inside the file, I guess this file is either created as part of installation or as part of wicd runtime.

Comment 9 Miroslav Grepl 2012-04-10 10:05:51 UTC
I see it now

comm="wicd"

Comment 10 Jiri Popelka 2012-04-17 11:23:41 UTC
Miroslav, can you reassign this to either selinux-policy or wicd ?
This isn't a dhcp issue, is it ?

Comment 11 Miroslav Grepl 2012-04-20 12:16:54 UTC
(In reply to comment #7)
> How is this file created?

^

Comment 12 Daniel Walsh 2012-04-20 15:10:05 UTC
Currently we have these labeled as /etc/wicd/manager-settings.conf NetworkManager_lib_t?  Have they moved?

Comment 13 David Cantrell 2012-04-20 18:31:04 UTC
/etc/wicd is the correct location.  This looks like a dupe of bug #754412.

Comment 14 Daniel Walsh 2012-04-22 11:45:21 UTC

*** This bug has been marked as a duplicate of bug 754412 ***


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