Bug 622978 - SELinux is preventing /usr/sbin/sendmail.sendmail access to a leaked /opt/lampp/logs/error_log file descriptor.
Summary: SELinux is preventing /usr/sbin/sendmail.sendmail access to a leaked /opt/lam...
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy   
(Show other bugs)
Version: 13
Hardware: i386 Linux
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
Whiteboard: setroubleshoot_trace_hash:30c1508f969...
Depends On:
TreeView+ depends on / blocked
Reported: 2010-08-10 23:26 UTC by PRABIN KUMAR DATTA
Modified: 2010-09-02 17:05 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-08-11 08:56:59 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description PRABIN KUMAR DATTA 2010-08-10 23:26:07 UTC

SELinux is preventing /usr/sbin/sendmail.sendmail access to a leaked
/opt/lampp/logs/error_log file descriptor.

Detailed Description:

[sendmail has a permissive type (sendmail_t). This access was not denied.]

SELinux denied access requested by the sendmail command. It looks like this is
either a leaked descriptor or sendmail output was redirected to a file it is not
allowed to access. Leaks usually can be ignored since SELinux is just closing
the leak and reporting the error. The application does not use the descriptor,
so it will run properly. If this is a redirection, you will not get output in
the /opt/lampp/logs/error_log. You should generate a bugzilla on selinux-policy,
and it will get routed to the appropriate package. You can safely ignore this

Allowing Access:

You can generate a local policy module to allow this access - see FAQ

Additional Information:

Source Context                system_u:system_r:sendmail_t:s0
Target Context                system_u:object_r:usr_t:s0
Target Objects                /opt/lampp/logs/error_log [ file ]
Source                        sendmail
Source Path                   /usr/sbin/sendmail.sendmail
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           sendmail-8.14.4-4.fc13
Target RPM Packages           
Policy RPM                    selinux-policy-3.7.19-41.fc13
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   leaks
Host Name                     (removed)
Platform                      Linux (removed)
                     #1 SMP Fri Jul 23
                              17:21:06 UTC 2010 i686 i686
Alert Count                   1
First Seen                    Wed 11 Aug 2010 01:25:55 AM IST
Last Seen                     Wed 11 Aug 2010 01:25:55 AM IST
Local ID                      8e629946-8226-4e56-a7a0-bb0fc9f81e97
Line Numbers                  

Raw Audit Messages            

node=(removed) type=AVC msg=audit(1281470155.189:21822): avc:  denied  { append } for  pid=3515 comm="sendmail" path="/opt/lampp/logs/error_log" dev=sda5 ino=1440893 scontext=system_u:system_r:sendmail_t:s0 tcontext=system_u:object_r:usr_t:s0 tclass=file

node=(removed) type=SYSCALL msg=audit(1281470155.189:21822): arch=40000003 syscall=11 success=yes exit=0 a0=94903a8 a1=9490480 a2=948f8b8 a3=9490480 items=0 ppid=1546 pid=3515 auid=4294967295 uid=99 gid=99 euid=99 suid=99 fsuid=99 egid=482 sgid=482 fsgid=482 tty=(none) ses=4294967295 comm="sendmail" exe="/usr/sbin/sendmail.sendmail" subj=system_u:system_r:sendmail_t:s0 key=(null)

Hash String generated from  leaks,sendmail,sendmail_t,usr_t,file,append
audit2allow suggests:

#============= sendmail_t ==============
allow sendmail_t usr_t:file append;

Comment 1 Miroslav Grepl 2010-08-11 08:56:59 UTC
Looks like lampp tool is leaking a file descriptor.

Try to execute

chcon -t var_log_t /opt/lampp/logs/error_log

Should fix.

Comment 2 Daniel Walsh 2010-08-11 12:16:06 UTC
You want to run 

# semanage fcontext -a -t var_log_t '/opt/lampp/logs(/.*)?'

To make this change permanent.

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