Bug 428335 - send mails denials for mantis package
Summary: send mails denials for mantis package
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 8
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks: 257561
TreeView+ depends on / blocked
 
Reported: 2008-01-10 21:59 UTC by Gianluca Sforna
Modified: 2008-01-14 18:27 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-01-11 20:08:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Gianluca Sforna 2008-01-10 21:59:08 UTC
The mantis package (it is a php based bug tracker application) needs to send
mails with notifications about various events.

All the three methods available for sending are blocked by SElinux :)

1. using the php mail() function

avc: denied { execute } for comm=sh dev=dm-0 name=sendmail.sendmail pid=3624
scontext=unconfined_u:system_r:httpd_t:s0 tclass=file
tcontext=system_u:object_r:sendmail_exec_t:s0 

2. using sendmail
avc: denied { execute } for comm=sh dev=dm-0 egid=48 euid=48 exe=/bin/bash
exit=-13 fsgid=48 fsuid=48 gid=48 items=0 name=sendmail.sendmail pid=4231
scontext=unconfined_u:system_r:httpd_t:s0 sgid=48
subj=unconfined_u:system_r:httpd_t:s0 suid=48 tclass=file
tcontext=system_u:object_r:sendmail_exec_t:s0 tty=(none) uid=48 

3. using SMTP
avc: denied { name_connect } for comm=httpd dest=25 pid=2692
scontext=unconfined_u:system_r:httpd_t:s0 tclass=tcp_socket
tcontext=system_u:object_r:smtp_port_t:s0 

any help appreciated...

Comment 1 Daniel Walsh 2008-01-11 20:08:53 UTC
You need to turn on the boolean httpd_can_sendmail

setsebool -P httpd_can_sendmail=1

Comment 2 Gianluca Sforna 2008-01-11 22:11:41 UTC
Is "you" the final user or I can add that that command to package %post ?

Does that also cover case 3 above?

Anyway, thanks for the prompt reply



Comment 3 Daniel Walsh 2008-01-14 18:27:08 UTC
Yes.  It will cover all three.  If your package requires this, yes you can put
it in your post install.

selinuxenabled && setsebool -P httpd_can_sendmail=1

The problem is that you can not turn it off when you remove your package.

Allowing http to send mail, open http up to potential worm attacks/spam
vulnerabilities.  So having a separate cgi would work better.  But since your
app is written in mod_php, that is all we have.


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