Bug 694978 - SELinux is preventing /usr/libexec/nm-openvpn-service from 'open' accesses on the file maidenhead-tunnelr.key.
Summary: SELinux is preventing /usr/libexec/nm-openvpn-service from 'open' accesses on...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 15
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:b1a9ee5eef3...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-09 11:21 UTC by Michel Alexandre Salim
Modified: 2011-04-11 10:58 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-11 10:50:26 UTC
Type: ---


Attachments (Terms of Use)

Description Michel Alexandre Salim 2011-04-09 11:21:05 UTC
SELinux is preventing /usr/libexec/nm-openvpn-service from 'open' accesses on the file maidenhead-tunnelr.key.

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

If you believe that nm-openvpn-service should be allowed open access on the maidenhead-tunnelr.key 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 nm-openvpn-serv /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:config_home_t:s0
Target Objects                maidenhead-tunnelr.key [ file ]
Source                        nm-openvpn-serv
Source Path                   /usr/libexec/nm-openvpn-service
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           NetworkManager-openvpn-0.8.998-1.git20110405.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-12.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.38.2-9.fc15.x86_64
                              #1 SMP Wed Mar 30 16:55:57 UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Sat 09 Apr 2011 01:19:06 PM CEST
Last Seen                     Sat 09 Apr 2011 01:19:06 PM CEST
Local ID                      00bce742-b475-4e93-9f97-7660d85e9182

Raw Audit Messages
type=AVC msg=audit(1302347946.403:79): avc:  denied  { open } for  pid=2565 comm="nm-openvpn-serv" name="maidenhead-tunnelr.key" dev=sda8 ino=7866654 scontext=system_u:system_r:NetworkManager_t:s0 tcontext=unconfined_u:object_r:config_home_t:s0 tclass=file


type=SYSCALL msg=audit(1302347946.403:79): arch=x86_64 syscall=open success=yes exit=ENXIO a0=1d9f5e0 a1=0 a2=3f8f736858 a3=7fffc884a300 items=0 ppid=730 pid=2565 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=nm-openvpn-serv exe=/usr/libexec/nm-openvpn-service subj=system_u:system_r:NetworkManager_t:s0 key=(null)

Hash: nm-openvpn-serv,NetworkManager_t,config_home_t,file,open

audit2allow

#============= NetworkManager_t ==============
allow NetworkManager_t config_home_t:file open;

audit2allow -R

#============= NetworkManager_t ==============
allow NetworkManager_t config_home_t:file open;

Comment 1 Miroslav Grepl 2011-04-11 06:03:04 UTC
Is  this a default location where maidenhead-tunnelr.key is located? Or did you move the key file to this directory?

Comment 2 Michel Alexandre Salim 2011-04-11 10:50:26 UTC
Apologies for this; I meant to close the ticket. I put the CA certificate and private key under ~/.config/tunnelr, and openvpn-serv understandably does not have read access to it.

Comment 3 Miroslav Grepl 2011-04-11 10:58:12 UTC
Can you move certs and keys to ~/.cert or ~/.pki and run restorecon on them.

Otherwise you can add a custom policy module using audit2allow.

# grep nm-openvpn-serv /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp


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