RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 965041 - freeradius cannot connect to postgresql
Summary: freeradius cannot connect to postgresql
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-20 10:53 UTC by Patrik Kis
Modified: 2014-06-18 02:21 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 09:48:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Patrik Kis 2013-05-20 10:53:30 UTC
Description of problem:
raiudusd server cannot connect to postgresql socket on RHEL-7, but on RHEL-6 it is possible.

type=SYSCALL msg=audit(1368651809.211:10479): arch=c000003e syscall=42 success=no exit=-13 a0=4 a1=7f8d8fd4d600 a2=10 a3=7fff8adf2fe8 items=0 ppid=1 pid=26593 auid=4294967295 uid=0 gid=95 euid=95 suid=0 fsuid=95 egid=95 sgid=95 fsgid=95 ses=4294967295 tty=(none) comm="radiusd" exe="/usr/sbin/radiusd" subj=system_u:system_r:radiusd_t:s0 key=(null)
type=AVC msg=audit(1368651809.211:10479): avc:  denied  { name_connect } for  pid=26593 comm="radiusd" dest=5432 scontext=system_u:system_r:radiusd_t:s0 tcontext=system_u:object_r:postgresql_port_t:s0 tclass=tcp_socket

Version-Release number of selected component (if applicable):
selinux-policy-3.12.1-38.el7

How reproducible:
always

Steps to Reproduce:
1. Integrate freeradius with postgresql
2. Start radiusd
3. The following AVC denial is raised
type=SYSCALL msg=audit(1368651809.211:10479): arch=c000003e syscall=42 success=no exit=-13 a0=4 a1=7f8d8fd4d600 a2=10 a3=7fff8adf2fe8 items=0 ppid=1 pid=26593 auid=4294967295 uid=0 gid=95 euid=95 suid=0 fsuid=95 egid=95 sgid=95 fsgid=95 ses=4294967295 tty=(none) comm="radiusd" exe="/usr/sbin/radiusd" subj=system_u:system_r:radiusd_t:s0 key=(null)
type=AVC msg=audit(1368651809.211:10479): avc:  denied  { name_connect } for  pid=26593 comm="radiusd" dest=5432 scontext=system_u:system_r:radiusd_t:s0 tcontext=system_u:object_r:postgresql_port_t:s0 tclass=tcp_socket

Actual results:

RHEL-7:

0 [root@rhel7 ~ ]# rpm -q selinux-policy
selinux-policy-3.12.1-38.el7.noarch
0 [root@rhel7 ~ ]# sesearch -A -C -s radiusd_t -t postgresql_port_t -c tcp_socket
Found 2 semantic av rules:
   allow radiusd_t port_type : tcp_socket { recv_msg send_msg } ; 
DT allow nsswitch_domain port_type : tcp_socket { recv_msg send_msg } ; [ nis_enabled ]

Expected results:

RHEL-6:

[root@rhel6 ~]# rpm -q selinux-policy
selinux-policy-3.7.19-195.el6.noarch
[root@rhel6 ~]# sesearch -A -C -s radiusd_t -t postgresql_port_t -c tcp_socket
Found 3 semantic av rules:
   allow radiusd_t postgresql_port_t : tcp_socket name_connect ; 
   allow radiusd_t port_type : tcp_socket { recv_msg send_msg } ; 
DT allow radiusd_t port_type : tcp_socket { recv_msg send_msg } ; [ allow_ypbind ]

Comment 2 Miroslav Grepl 2013-05-22 07:12:37 UTC
Fixed in selinux-policy-3.12.1-46.el7

Comment 4 Ludek Smid 2014-06-13 09:48:32 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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