Bug 481624

Summary: mailman with courier gives selinux denials
Product: [Fedora] Fedora Reporter: Pierre Ossman <pierre-bugzilla>
Component: selinux-policy-targetedAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: low    
Version: 10   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-18 11:02:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pierre Ossman 2009-01-26 19:32:22 UTC
As it seems I'm the only one using courier on Fedora, I should probably report my recent problems with it and SELinux.

Also, Daniel is so helpful today so I might as well take advantage of that. ;)

After an upgrade to F10, mailman is doing something in courier's spool directory:

Jan 26 03:46:18 odin kernel: type=1400 audit(1232937978.380:715): avc:  denied  { read } for  pid=13311 comm="mailman" path="/var/spool/courier/msgs/30/D3145730" dev=dm-0 ino=3145732 scontext=system_u:system_r:mailman_mail_t:s0 tcontext=system_u:object_r:courier_spool_t:s0 tclass=file
Jan 26 03:46:18 odin kernel: type=1400 audit(1232937978.404:716): avc:  denied  { ioctl } for  pid=13311 comm="python" path="/var/spool/courier/msgs/30/D3145730" dev=dm-0 ino=3145732 scontext=system_u:system_r:mailman_mail_t:s0 tcontext=system_u:object_r:courier_spool_t:s0 tclass=file
Jan 26 03:46:18 odin kernel: type=1400 audit(1232937978.411:717): avc:  denied  { getattr } for  pid=13311 comm="python" path="/var/spool/courier/msgs/30/D3145730" dev=dm-0 ino=3145732 scontext=system_u:system_r:mailman_mail_t:s0 tcontext=system_u:object_r:courier_spool_t:s0 tclass=file

I don't know enough about mailman to know for sure what it is up to here. Looking at the mail log, it got a message at this time which should mean that /usr/lib/mailman/mail/mailman got executed with /var/spool/courier/msgs/30/D3145730 as stdin.

So mailman_mail_t probably needs to be able to read all kinds of mail, which in this case means courier_spool_t.

Comment 1 Daniel Walsh 2009-01-26 20:07:38 UTC
Miroslav, add

	courier_read_spool(mailman_mail_t)

You will have to generate an interface,  We might want to consider changing the label of this directory to mail_spool_t, to prevent this type of errors in the future.

Comment 2 Miroslav Grepl 2009-01-27 18:42:27 UTC
Fixed in selinux-policy-3.5.13-41.fc10

Comment 3 Bug Zapper 2009-11-18 10:52:40 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping