Bug 743814 - SELinux is preventing /usr/bin/python from using the 'sys_tty_config' capabilities.
Summary: SELinux is preventing /usr/bin/python from using the 'sys_tty_config' capabil...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:e3fe5eddd02...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-06 07:34 UTC by Nikita Bige
Modified: 2012-02-10 08:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-10 08:55:04 UTC
Type: ---


Attachments (Terms of Use)

Description Nikita Bige 2011-10-06 07:34:16 UTC
SELinux is preventing /usr/bin/python from using the 'sys_tty_config' capabilities.

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

If you believe that python should have the sys_tty_config capability 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-client /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:fail2ban_client_t:s0
Target Context                system_u:system_r:fail2ban_client_t:s0
Target Objects                Unknown [ capability ]
Source                        fail2ban-client
Source Path                   /usr/bin/python
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           python-2.7.1-7.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-39.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40.4-5.fc15.x86_64 #1
                              SMP Tue Aug 30 14:38:32 UTC 2011 x86_64 x86_64
Alert Count                   2
First Seen                    Thu 06 Oct 2011 10:27:11 AM MSK
Last Seen                     Thu 06 Oct 2011 10:29:00 AM MSK
Local ID                      0873f738-8f7f-4657-9b07-c8f274c40077

Raw Audit Messages
type=AVC msg=audit(1317886140.959:42): avc:  denied  { sys_tty_config } for  pid=1939 comm="fail2ban-client" capability=26  scontext=system_u:system_r:fail2ban_client_t:s0 tcontext=system_u:system_r:fail2ban_client_t:s0 tclass=capability


type=SYSCALL msg=audit(1317886140.959:42): arch=x86_64 syscall=ioctl success=yes exit=0 a0=2 a1=5401 a2=7fffd21704c8 a3=3f5279422c items=0 ppid=1932 pid=1939 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=fail2ban-client exe=/usr/bin/python subj=system_u:system_r:fail2ban_client_t:s0 key=(null)

Hash: fail2ban-client,fail2ban_client_t,fail2ban_client_t,capability,sys_tty_config

audit2allow

#============= fail2ban_client_t ==============
allow fail2ban_client_t self:capability sys_tty_config;

audit2allow -R

#============= fail2ban_client_t ==============
allow fail2ban_client_t self:capability sys_tty_config;

Comment 1 Daniel Walsh 2011-10-06 14:02:23 UTC
I would dontaudit this.  No idea what it is doing,

Comment 2 Miroslav Grepl 2011-10-07 10:00:04 UTC
Fixed in selinux-policy-3.9.16-43.fc15.


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