Bug 1032111 - SELinux is preventing /usr/sbin/mysqld from 'name_connect' accesses on the tcp_socket .
SELinux is preventing /usr/sbin/mysqld from 'name_connect' accesses on the tc...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
20
i686 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:f135e467cade3dbe1f87a10a275...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-19 10:04 EST by Mikhail
Modified: 2013-11-25 08:59 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-25 08:59:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mikhail 2013-11-19 10:04:06 EST
Description of problem:
This access needed for use CONNECT engine for connect from MariaDB to another ODBC Data Sources.
SELinux is preventing /usr/sbin/mysqld from 'name_connect' accesses on the tcp_socket .

*****  Plugin connect_ports (85.9 confidence) suggests   *********************

If you want to allow /usr/sbin/mysqld to connect to network port 1972
Then you need to modify the port type.
Do
# semanage port -a -t PORT_TYPE -p tcp 1972
    where PORT_TYPE is one of the following: dns_port_t, kerberos_port_t, mysqld_port_t, ocsp_port_t.

*****  Plugin catchall_boolean (7.33 confidence) suggests   ******************

If you want to allow nis to enabled
Then you must tell SELinux about this by enabling the 'nis_enabled' boolean.
You can read 'None' man page for more details.
Do
setsebool -P nis_enabled 1

*****  Plugin catchall_boolean (7.33 confidence) suggests   ******************

If you want to allow mysql to connect any
Then you must tell SELinux about this by enabling the 'mysql_connect_any' boolean.
You can read 'None' man page for more details.
Do
setsebool -P mysql_connect_any 1

*****  Plugin catchall (1.35 confidence) suggests   **************************

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

Additional Information:
Source Context                unconfined_u:system_r:mysqld_t:s0
Target Context                system_u:object_r:unreserved_port_t:s0
Target Objects                 [ tcp_socket ]
Source                        mysqld
Source Path                   /usr/sbin/mysqld
Port                          1972
Host                          (removed)
Source RPM Packages           MariaDB-server-10.0.6-1.i686
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-90.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.12.0-2.fc21.i686+PAE #1 SMP Sat
                              Nov 9 21:31:51 UTC 2013 i686 i686
Alert Count                   1
First Seen                    2013-11-19 20:55:34 YEKT
Last Seen                     2013-11-19 20:55:34 YEKT
Local ID                      3c791588-2b62-437b-a988-eda9c1976cc6

Raw Audit Messages
type=AVC msg=audit(1384872934.568:944): avc:  denied  { name_connect } for  pid=2065 comm="mysqld" dest=1972 scontext=unconfined_u:system_r:mysqld_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=tcp_socket


type=SYSCALL msg=audit(1384872934.568:944): arch=i386 syscall=socketcall success=no exit=EINPROGRESS a0=3 a1=b759d9c0 a2=b755c37c a3=0 items=0 ppid=1891 pid=2065 auid=1000 uid=988 gid=985 euid=988 suid=988 fsuid=988 egid=985 sgid=985 fsgid=985 ses=1 tty=pts13 comm=mysqld exe=/usr/sbin/mysqld subj=unconfined_u:system_r:mysqld_t:s0 key=(null)

Hash: mysqld,mysqld_t,unreserved_port_t,tcp_socket,name_connect

Additional info:
reporter:       libreport-2.1.9
hashmarkername: setroubleshoot
kernel:         3.12.0-2.fc21.i686+PAE
type:           libreport
Comment 1 Miroslav Grepl 2013-11-25 08:59:13 EST
The SELinux alert tells you what to do.

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