Bug 666437 - SELinux is preventing /usr/sbin/sendmail.sendmail from 'search' accesses on the directory /etc/mail.
Summary: SELinux is preventing /usr/sbin/sendmail.sendmail from 'search' accesses on t...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:0e6f9e2003a...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-30 18:44 UTC by Laurent Forthomme
Modified: 2011-01-03 14:04 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-03 14:04:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Laurent Forthomme 2010-12-30 18:44:29 UTC
SELinux is preventing /usr/sbin/sendmail.sendmail from 'search' accesses on the directory /etc/mail.

*****  Plugin httpd_can_sendmail (91.4 confidence) suggests  *****************

If you want to allow httpd to send mail
Then you must setup SELinux to allow this
Do
setsebool -P httpd_can_sendmail=1

*****  Plugin catchall (9.59 confidence) suggests  ***************************

If you believe that sendmail.sendmail should be allowed search access on the mail directory 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 /usr/sbin/sendmail.sendmail /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                unconfined_u:system_r:httpd_t:s0
Target Context                system_u:object_r:etc_mail_t:s0
Target Objects                /etc/mail [ dir ]
Source                        sendmail
Source Path                   /usr/sbin/sendmail.sendmail
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           sendmail-8.14.4-10.fc14
Target RPM Packages           sendmail-8.14.4-10.fc14
Policy RPM                    selinux-policy-3.9.7-18.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.10-74.fc14.i686 #1 SMP Thu Dec 23
                              16:17:40 UTC 2010 i686 i686
Alert Count                   2
First Seen                    Wed 29 Dec 2010 17:30:50 CET
Last Seen                     Wed 29 Dec 2010 17:30:50 CET
Local ID                      6c2c37c8-c990-4df1-8f18-653a0ce70b4a

Raw Audit Messages
type=AVC msg=audit(1293640250.536:23298): avc:  denied  { search } for  pid=4662 comm="sendmail" name="mail" dev=dm-0 ino=27895 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=system_u:object_r:etc_mail_t:s0 tclass=dir

sendmail,httpd_t,etc_mail_t,dir,search
type=SYSCALL msg=audit(1293640250.536:23298): arch=i386 syscall=stat64 success=no exit=EACCES a0=bf9080cc a1=bf907f4c a2=776ff4 a3=3 items=0 ppid=700 pid=4662 auid=500 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=51 sgid=51 fsgid=51 tty=(none) ses=1 comm=sendmail exe=/usr/sbin/sendmail.sendmail subj=unconfined_u:system_r:httpd_t:s0 key=(null)
sendmail,httpd_t,etc_mail_t,dir,search

#============= httpd_t ==============
allow httpd_t etc_mail_t:dir search;

Comment 1 Miroslav Grepl 2011-01-03 14:04:29 UTC
The alert told you what to do.

*****  Plugin httpd_can_sendmail (91.4 confidence) suggests  *****************

If you want to allow httpd to send mail
Then you must setup SELinux to allow this
Do

setsebool -P httpd_can_sendmail=1


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