Bug 680655 - SELinux is preventing /usr/bin/python from 'connectto' accesses on the unix_stream_socket @/tmp/fam-root-.
Summary: SELinux is preventing /usr/bin/python from 'connectto' accesses on the unix_s...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: fail2ban
Version: 14
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Axel Thimm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:d7980fdb07a...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-26 18:56 UTC by Chris Jones
Modified: 2011-03-09 22:56 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-07 22:29:43 UTC
Type: ---


Attachments (Terms of Use)

Description Chris Jones 2011-02-26 18:56:03 UTC
SELinux is preventing /usr/bin/python from 'connectto' accesses on the unix_stream_socket @/tmp/fam-root-.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that python should be allowed connectto access on the fam-root- unix_stream_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 fail2ban-server /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:fail2ban_t:s0
Target Context                system_u:system_r:initrc_t:s0
Target Objects                @/tmp/fam-root- [ unix_stream_socket ]
Source                        fail2ban-server
Source Path                   /usr/bin/python
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.7-8.fc14.1
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.7-31.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed)
                              2.6.35.11-83.fc14.x86_64 #1 SMP Mon Feb 7 07:06:44
                              UTC 2011 x86_64 x86_64
Alert Count                   1
First Seen                    Sat 26 Feb 2011 06:52:04 PM GMT
Last Seen                     Sat 26 Feb 2011 06:52:04 PM GMT
Local ID                      a044fc22-a91f-48c3-9344-1c0503065d0a

Raw Audit Messages
type=AVC msg=audit(1298746324.762:33758): avc:  denied  { connectto } for  pid=4302 comm="fail2ban-server" path=002F746D702F66616D2D726F6F742D000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 scontext=system_u:system_r:fail2ban_t:s0 tcontext=system_u:system_r:initrc_t:s0 tclass=unix_stream_socket


type=SYSCALL msg=audit(1298746324.762:33758): arch=x86_64 syscall=connect success=yes exit=0 a0=4 a1=7fff5a27d660 a2=6e a3=4 items=0 ppid=1 pid=4302 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=fail2ban-server exe=/usr/bin/python subj=system_u:system_r:fail2ban_t:s0 key=(null)

Hash: fail2ban-server,fail2ban_t,initrc_t,unix_stream_socket,connectto

audit2allow

#============= fail2ban_t ==============
allow fail2ban_t initrc_t:unix_stream_socket connectto;

audit2allow -R

#============= fail2ban_t ==============
allow fail2ban_t initrc_t:unix_stream_socket connectto;

Comment 1 Miroslav Grepl 2011-02-27 22:41:44 UTC
Which process is running as initrc_t domain?

# ps -eZ |grep initrc

Comment 2 Chris Jones 2011-03-04 16:31:13 UTC
At this time these processes are running:-

system_u:system_r:initrc_t:s0    2543 ?        00:00:04 BackupPC
system_u:system_r:initrc_t:s0    2544 ?        00:00:00 BackupPC_trashC
system_u:system_r:initrc_t:s0    2713 ?        00:00:02 miniserv.pl
system_u:system_r:initrc_t:s0   14293 ?        00:00:07 system-config-s

Comment 3 Miroslav Grepl 2011-03-07 09:47:28 UTC
Could you add output of

# ps -efZ |grep initrc


Also does miniserv.pl create @/tmp/fam-root- socket?

Comment 4 Daniel Walsh 2011-03-07 22:29:43 UTC
fail2ban should be setup to use polling and not use fam server.

Comment 5 Chris Jones 2011-03-09 22:56:16 UTC
Miroslav

Here is the output of ps -efZ | grep initrc
system_u:system_r:initrc_t:s0   backuppc  2543     1  0 Mar02 ?        00:00:16 /usr/bin/perl /usr/share/BackupPC/bin/BackupPC -d
system_u:system_r:initrc_t:s0   backuppc  2544  2543  0 Mar02 ?        00:00:02 /usr/bin/perl /usr/share/BackupPC/bin/BackupPC_trashClean
system_u:system_r:initrc_t:s0   root      2713     1  0 Mar02 ?        00:00:10 /usr/bin/perl /usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
unconfined_u:system_r:initrc_t:s0 root   12861     1  0 Mar04 ?        00:04:35 /usr/bin/mythbackend --daemon --logfile /var/log/mythtv/mythbackend.log --pidfile /var/run/mythbackend.pid
system_u:system_r:initrc_t:s0   root     14293     1  0 Mar03 ?        00:00:09 /usr/bin/python /usr/share/system-config-services/system-config-services-mechanism.py
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 22309 17065  0 22:53 pts/0 00:00:00 grep --color=auto initrc
[root@localhost etc]# 


Where would I find miniserv.pl?


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