Bug 700710 - SELinux is preventing /usr/sbin/openvpn from 'read' accesses on the file /home/newman/.rh_ca_cert/newca.crt.
Summary: SELinux is preventing /usr/sbin/openvpn from 'read' accesses on the file /hom...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:1d5328dcd5c...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-29 06:31 UTC by Michal Nowak
Modified: 2013-03-08 02:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-29 07:19:28 UTC
Type: ---


Attachments (Terms of Use)

Description Michal Nowak 2011-04-29 06:31:32 UTC
SELinux is preventing /usr/sbin/openvpn from 'read' accesses on the file /home/newman/.rh_ca_cert/newca.crt.

*****  Plugin openvpn (47.5 confidence) suggests  ****************************

If you want to mv newca.crt to standard location so that openvpn can have read access
Then you must move the cert file to the ~/.cert directory
Do
# mv /home/newman/.rh_ca_cert/newca.crt ~/.cert
# restorecon -R -v ~/.cert


*****  Plugin openvpn (47.5 confidence) suggests  ****************************

If you want to modify the label on newca.crt so that openvpn can have read access on it
Then you must fix the labels.
Do
# semanage fcontext -a -t home_cert_t /home/newman/.rh_ca_cert/newca.crt
# restorecon -R -v /home/newman/.rh_ca_cert/newca.crt


*****  Plugin catchall (6.38 confidence) suggests  ***************************

If you believe that openvpn should be allowed read access on the newca.crt 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 openvpn /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:openvpn_t:s0
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /home/newman/.rh_ca_cert/newca.crt [ file ]
Source                        openvpn
Source Path                   /usr/sbin/openvpn
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           openvpn-2.1.1-2.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-40.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.12-90.fc14.i686 #1 SMP Fri Apr
                              22 16:14:44 UTC 2011 i686 i686
Alert Count                   1
First Seen                    Fri 29 Apr 2011 08:29:59 AM CEST
Last Seen                     Fri 29 Apr 2011 08:29:59 AM CEST
Local ID                      f21782b2-1995-48a0-8fbf-28419b81d969

Raw Audit Messages
type=AVC msg=audit(1304058599.451:102): avc:  denied  { read } for  pid=5811 comm="openvpn" name="newca.crt" dev=dm-6 ino=7215262 scontext=system_u:system_r:openvpn_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file


type=SYSCALL msg=audit(1304058599.451:102): arch=i386 syscall=open success=no exit=EACCES a0=bfe1cec7 a1=8000 a2=1b6 a3=4357ce5 items=0 ppid=5744 pid=5811 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=openvpn exe=/usr/sbin/openvpn subj=system_u:system_r:openvpn_t:s0 key=(null)

Hash: openvpn,openvpn_t,user_home_t,file,read

audit2allow

#============= openvpn_t ==============
allow openvpn_t user_home_t:file read;

audit2allow -R

#============= openvpn_t ==============
allow openvpn_t user_home_t:file read;

Comment 1 Miroslav Grepl 2011-04-29 07:19:28 UTC
Michal, the Plugin tells you what to do. Why do you think this is a bug?


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