Bug 428335 - send mails denials for mantis package
send mails denials for mantis package
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
Depends On:
Blocks: 257561
  Show dependency treegraph
Reported: 2008-01-10 16:59 EST by Gianluca Sforna
Modified: 2008-01-14 13:27 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-01-11 15:08:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Gianluca Sforna 2008-01-10 16:59:08 EST
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

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

any help appreciated...
Comment 1 Daniel Walsh 2008-01-11 15:08:53 EST
You need to turn on the boolean httpd_can_sendmail

setsebool -P httpd_can_sendmail=1
Comment 2 Gianluca Sforna 2008-01-11 17:11:41 EST
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 13:27:08 EST
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.