Bug 477214

Summary: SELinux prevents mailman from updating archive
Product: Red Hat Enterprise Linux 5 Reporter: Gordon Messmer <gordon.messmer>
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: BaseOS QE <qe-baseos-auto>
Severity: medium Docs Contact:
Priority: low    
Version: 5.2   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-07 11:53:34 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 Gordon Messmer 2008-12-19 17:26:27 UTC
Description of problem:
On a freshly installed system (testing under CentOS), mailman is not able to update its archives.  audit.log contains messages like:

type=AVC msg=audit(1229707095.625:82): avc:  denied  { search } for  pid=3973 comm="python" name="archives" dev=hda2 ino=224254 scontext=root:system_r:mail
man_mail_t:s0 tcontext=system_u:object_r:mailman_archive_t:s0 tclass=dir

The source and target contexts look correct.  I believe that archiving was probably overlooked when bug 350511 was fixed.

I was able to restore functionality by entering permissive mode and using audit2allow to generate this policy:

module localMailman 1.0;

require {
	type mailman_mail_t;
	type mailman_archive_t;
	class lnk_file create;
	class dir { write search remove_name create getattr add_name };
	class file { setattr read create write getattr link unlink append };
}

#============= mailman_mail_t ==============
allow mailman_mail_t mailman_archive_t:dir { write search remove_name create getattr add_name };
allow mailman_mail_t mailman_archive_t:file { setattr read create write getattr link unlink append };
allow mailman_mail_t mailman_archive_t:lnk_file create;



Version-Release number of selected component (if applicable):
mailman-2.1.9-4.el5
selinux-policy-2.4.6-137.1.el5

How reproducible:
Always

Steps to Reproduce:
1. Configure mailman according to /usr/share/doc/mailman-2.1.9/INSTALL.REDHAT
2. Send message
3. Check audit.log

Comment 1 Daniel Walsh 2008-12-22 15:26:36 UTC
Fixed in U3 policy

selinux-policy-2.4.6-203.el5.src.rpm

Preview available on http://people.redhat.com/dwalsh/SELinux/RHEL5