Bug 1129783 - SELinux is preventing /usr/bin/wget from 'name_connect' accesses on the tcp_socket .
Summary: SELinux is preventing /usr/bin/wget from 'name_connect' accesses on the tcp_s...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:67b58ff51b4adf755100a08a51f...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-13 16:00 UTC by Moez Roy
Modified: 2015-02-10 12:30 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-10 12:30:00 UTC


Attachments (Terms of Use)

Description Moez Roy 2014-08-13 16:00:11 UTC
Description of problem:
not really sure why I need to enable the boolean nis_enabled?
SELinux is preventing /usr/bin/wget from 'name_connect' accesses on the tcp_socket .

*****  Plugin catchall_boolean (89.3 confidence) suggests   ******************

If you want to allow system to run with NIS
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 (11.6 confidence) suggests   **************************

If you believe that wget 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 wget /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:system_cronjob_t:s0-s0:c0.c1023
Target Context                system_u:object_r:http_port_t:s0
Target Objects                 [ tcp_socket ]
Source                        wget
Source Path                   /usr/bin/wget
Port                          80
Host                          (removed)
Source RPM Packages           wget-1.14-12.fc20.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-179.fc20.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.15.8-200.fc20.x86_64 #1 SMP Fri
                              Aug 1 00:38:50 UTC 2014 x86_64 x86_64
Alert Count                   100
First Seen                    2014-08-11 03:45:32 PDT
Last Seen                     2014-08-11 03:57:38 PDT
Local ID                      2cd0108c-fdb9-4379-8914-106c3a33f688

Raw Audit Messages
type=AVC msg=audit(1407754658.861:533): avc:  denied  { name_connect } for  pid=1141 comm="wget" dest=80 scontext=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 tcontext=system_u:object_r:http_port_t:s0 tclass=tcp_socket


type=SYSCALL msg=audit(1407754658.861:533): arch=x86_64 syscall=connect success=no exit=EACCES a0=4 a1=7fff1fca1c20 a2=10 a3=7ff29ef76c8c items=0 ppid=30856 pid=1141 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4 comm=wget exe=/usr/bin/wget subj=system_u:system_r:system_cronjob_t:s0-s0:c0.c1023 key=(null)

Hash: wget,system_cronjob_t,http_port_t,tcp_socket,name_connect

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.15.8-200.fc20.x86_64
type:           libreport

Comment 1 Miroslav Grepl 2014-09-03 14:20:46 UTC
Lukas,
the same here to get it running in unconfined_t.


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