Bug 444901

Summary: does not work with selinux enforcing when using mysql
Product: Red Hat Enterprise Linux 5 Reporter: Martin Jürgens <ma>
Component: freeradiusAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 5.1   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: U2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-16 10:46:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Jürgens 2008-05-01 17:10:40 UTC
Description of problem:
SELinux blocks access to my.cnf when using freeradius to get its data from
mysql. Audit output follows:


type=AVC msg=audit(1209661497.852:49): avc:  denied  { getattr } for  pid=3755
comm="radiusd" path="/etc/my.cnf" dev=dm-0 ino=12158699
scontext=user_u:system_r:radiusd_t:s0 tcontext=system_u:object_r:mysqld_etc_t:s0
tclass=file
type=SYSCALL msg=audit(1209661497.852:49): arch=40000003 syscall=195 success=no
exit=-13 a0=bfad524e a1=bfad21ec a2=5e4ff4 a3=bfad524e items=0 ppid=3754
pid=3755 auid=500 uid=95 gid=95 euid=95 suid=95 fsuid=95 egid=95 sgid=95
fsgid=95 tty=pts3 comm="radiusd" exe="/usr/sbin/radiusd"
subj=user_u:system_r:radiusd_t:s0 key=(null)
type=AVC msg=audit(1209661497.852:50): avc:  denied  { getattr } for  pid=3755
comm="radiusd" path="/etc/my.cnf" dev=dm-0 ino=12158699
scontext=user_u:system_r:radiusd_t:s0 tcontext=system_u:object_r:mysqld_etc_t:s0
tclass=file
type=SYSCALL msg=audit(1209661497.852:50): arch=40000003 syscall=195 success=no
exit=-13 a0=bfad524e a1=bfad21ec a2=5e4ff4 a3=bfad524e items=0 ppid=3754
pid=3755 auid=500 uid=95 gid=95 euid=95 suid=95 fsuid=95 egid=95 sgid=95
fsgid=95 tty=pts3 comm="radiusd" exe="/usr/sbin/radiusd"
subj=user_u:system_r:radiusd_t:s0 key=(null)
type=AVC msg=audit(1209661497.852:51): avc:  denied  { name_connect } for 
pid=3755 comm="radiusd" dest=3306 scontext=user_u:system_r:radiusd_t:s0
tcontext=system_u:object_r:mysqld_port_t:s0 tclass=tcp_socket
type=SYSCALL msg=audit(1209661497.852:51): arch=40000003 syscall=102 success=no
exit=-13 a0=3 a1=bfad57c0 a2=26c134 a3=95d9c18 items=0 ppid=3754 pid=3755
auid=500 uid=95 gid=95 euid=95 suid=95 fsuid=95 egid=95 sgid=95 fsgid=95
tty=pts3 comm="radiusd" exe="/usr/sbin/radiusd"
subj=user_u:system_r:radiusd_t:s0 key=(null)

Comment 1 Daniel Walsh 2008-05-05 18:10:34 UTC
Fixed in selinux-policy-2.4.6-137.el5 

Preview available at http://people.redhat.com/dwalsh/SELinux/RHEL5

Comment 2 Martin Jürgens 2008-05-05 18:20:41 UTC
Thanks for the fast fix.

Comment 3 Martin Jürgens 2008-06-14 15:37:08 UTC
Q: Is this in the RHEL repos now? If yes, this can be closed probably.