Description of problem: SELinux is preventing sh (procmail_t) "getattr" to /usr/bin/spamassassin (spamassassin_exec_t). SELinux is preventing sh (procmail_t) "execute" to ./spamassassin (spamassassin_exec_t). Version-Release number of selected component (if applicable): selinux-policy-strict-2.4.6-203.el5 selinux-policy-mls-2.4.6-203.el5 selinux-policy-devel-2.4.6-203.el5 selinux-policy-targeted-2.4.6-203.el5 selinux-policy-2.4.6-203.el5 How reproducible: This started on the recent selinux upgrade which is now preventing procmail scripts from checking incoming e-mail against spamassassin. Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: I wrote the following policy to try to fix this problem: module procmailauth 1.0; require { type procmail_t; type var_log_t; type spamassassin_exec_t; type spamd_var_lib_t; class dir search; class dir execute; class file read; class file ioctl; class file execute; class file write; class file getattr; class file append; } #============= dovecot_auth_t ============== allow procmail_t spamassassin_exec_t:file { read ioctl write getattr append }; allow procmail_t spamassassin_exec_t:dir execute; allow procmail_t spamd_var_lib_t:dir search; The above didn't fix the problem. In fact additional sealerts like "ioctl" started occurring. So how may this problem be fixed?
I modified my policy as follows: module procmailauth 1.0; require { type procmail_t; type var_log_t; type spamassassin_exec_t; type spamd_var_lib_t; class dir search; class dir execute; class dir getattr; class dir read; class dir ioctl; class file read; class file ioctl; class file execute; class file execute_no_trans; class file write; class file getattr; class file append; } #============= dovecot_auth_t ============== allow procmail_t spamassassin_exec_t:file { read ioctl write getattr execute execute_no_tran s append }; allow procmail_t spamassassin_exec_t:dir { getattr execute }; allow procmail_t spamd_var_lib_t:file { getattr read ioctl}; allow procmail_t spamd_var_lib_t:dir { getattr read search ioctl }; This appears to be holding - procmail logs don't complain, procmail results are achieved, and no sealerts in messages. I'll let you know if this breaks. Thanks
Fixed in selinux-policy-2.4.6-207.el5 Preview of U4 policy currently available at http://people.redhat.com/dwalsh/SELinux/RHEL5
Fixed in selinux-policy-2.4.6-225.el5
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-1242.html