Hi,
I'm trying to get up to speed on SElinux so sorry for being so long.
I've managed to get rid of various avc denied messages. However I'm
getting the following two AVC denied messages from setroubleshoot. They
are not causing any problems but I would like to know how to go about
getting rid of them. Would I need to have some sort of local policy.
I'll include the complete message here.
Summary
SELinux is preventing /sbin/ifconfig (ifconfig_t) "write"
to /etc/openvpn/openvpn.log (openvpn_etc_t).
Detailed Description
SELinux denied access requested by /sbin/ifconfig. It is not expected
that this access is required by /sbin/ifconfig and this access may
signal an intrusion attempt. It is also possible that the specific
version or configuration of the application is causing it to require
additional access.
Allowing Access
Sometimes labeling problems can cause SELinux denials. You could try to
restore the default system file context for /etc/openvpn/openvpn.log,
restorecon -v /etc/openvpn/openvpn.log If this does not work, there is
currently no automatic way to allow this access. Instead, you can
generate a local policy module to allow this access - see FAQ Or you can
disable SELinux protection altogether. Disabling SELinux protection is
not recommended. Please file a bug report against this package.
Additional Information
Source Context system_u:system_r:ifconfig_t:s0
Target Context system_u:object_r:openvpn_etc_t:s0
Target Objects /etc/openvpn/openvpn.log [ file ]
Affected RPM Packages net-tools-1.60-73 [application]
Policy RPM selinux-policy-2.4.3-10.fc6
Selinux Enabled True
Policy Type targeted
MLS Enabled True
Enforcing Mode Enforcing
Plugin Name plugins.catchall
Host Name localhost
Platform Linux localhost 2.6.18-1.8492.fc6 #1 SMP Fri Nov 10 12:45:28 EST
2006 i686 i686
Raw Audit Messages
avc: denied { write } for comm='"ifconfig"' dev='sda10' egid='0' euid='0'
exe='"/sbin/ifconfig"' exit='0' fsgid='0' fsuid='0' gid='0' items='0'
name='"openvpn.log"' path='"/etc/openvpn/openvpn.log"' pid='2983'
scontext=system_u:system_r:ifconfig_t:s0 sgid='0'
subj='system_u:system_r:ifconfig_t:s0' suid='0' tclass='file'
tcontext=system_u:object_r:openvpn_etc_t:s0 tty='(none)' uid='0'
This is on a laptop. I tried "restorecon -v /etc/openvpn/openvpn.log" but
since openvpn.log is recreated on each boot then it's always going to
have the wrong label. How can I get rid of this.