Bug 698403

Summary: SELinux is preventing NetworkManager from 'setattr' accesses on the file /etc/NetworkManager/system-connections/ovpn-phx2-udp-x86_64.
Product: [Fedora] Fedora Reporter: Adam Williamson <awilliam>
Component: NetworkManagerAssignee: Dan Williams <dcbw>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 15CC: dcbw, dwalsh, jklimes, maurizio.antillon, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:deb4c42a7c1f2dfa79564f12d31b568fd0b2bed4aa6a20aad31fb10befaca892
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-07 20:23:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Adam Williamson 2011-04-20 20:00:30 UTC
SELinux is preventing NetworkManager from 'setattr' accesses on the file /etc/NetworkManager/system-connections/ovpn-phx2-udp-x86_64.

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

If you believe that NetworkManager should be allowed setattr access on the ovpn-phx2-udp-x86_64 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 NetworkManager /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                system_u:object_r:NetworkManager_etc_t:s0
Target Objects                /etc/NetworkManager/system-connections/ovpn-phx2
                              -udp-x86_64 [ file ]
Source                        NetworkManager
Source Path                   NetworkManager
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-15.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.3-15.rc1.fc15.x86_64 #1 SMP Wed
                              Apr 13 18:48:28 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Wed 20 Apr 2011 12:59:33 PM PDT
Last Seen                     Wed 20 Apr 2011 12:59:33 PM PDT
Local ID                      51d53815-5b28-4979-883c-5ae511113397

Raw Audit Messages
type=AVC msg=audit(1303329573.337:1485): avc:  denied  { setattr } for  pid=942 comm="NetworkManager" name="ovpn-phx2-udp-x86_64" dev=dm-0 ino=8209 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=system_u:object_r:NetworkManager_etc_t:s0 tclass=file


Hash: NetworkManager,NetworkManager_t,NetworkManager_etc_t,file,setattr

audit2allow

#============= NetworkManager_t ==============
allow NetworkManager_t NetworkManager_etc_t:file setattr;

audit2allow -R

#============= NetworkManager_t ==============
allow NetworkManager_t NetworkManager_etc_t:file setattr;

Comment 1 Adam Williamson 2011-04-20 20:00:57 UTC
Tried to connect to an OpenVPN.

Comment 2 Daniel Walsh 2011-04-20 20:37:34 UTC
Should  /etc/NetworkManager/system-connections/ovpn-phx2
                              -udp-x86_64  be writable by NetworkManager?

Comment 3 Jirka Klimes 2011-04-21 08:56:31 UTC
(In reply to comment #2)
> Should  /etc/NetworkManager/system-connections/ovpn-phx2
>                               -udp-x86_64  be writable by NetworkManager?

Yeah, /etc/NetworkManager/system-connections/ is the directory where NetworkManager stores configured connections when keyfile plugin is used. Each connection is stored in its own file.

Comment 4 Daniel Walsh 2011-04-21 13:00:05 UTC
Fixed in selinux-policy-3.9.16-16.fc15

Miroslav we need this fix back ported to RHEL6.

Comment 5 Miroslav Grepl 2011-04-26 07:14:06 UTC
We have in Fedora13/RHEL6

/etc/NetworkManager(/.*)?   gen_context(system_u:object_r:NetworkManager_var_lib_t, s0)

/etc/NetworkManager/system-connections(/.*)?    gen_context(system_u:object_r:NetworkManager_var_lib_t, s0)

So it is allowed.

Comment 8 Fedora End Of Life 2012-08-07 20:23:18 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached 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 to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

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.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping