Bug 842927

Summary: selinux policy prevents procmail access to Maildir
Product: Red Hat Enterprise Linux 6 Reporter: Vadym Chepkov <vchepkov>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Michal Trunecka <mtruneck>
Severity: high Docs Contact:
Priority: medium    
Version: 6.3CC: dwalsh, ebenes, mailings, mmalik, mtruneck
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.7.19-159.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 08:26:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vadym Chepkov 2012-07-25 00:32:23 UTC
selinux-policy-targeted-3.7.19-155.el6_3.noarch

# cat /etc/procmailrc 
LOGFILE=/var/log/procmail.log
LOGABSTRACT=all

DROPPRIVS=yes
MAILDIR=$HOME/Maildir
DEFAULT=$MAILDIR/

I have tried selinux-policy-targeted-3.7.19-156.el6.noarch from http://people.redhat.com/dwalsh/SELinux/RHEL6/noarch/ - same result :


----
time->Tue Jul 24 20:27:36 2012
type=SYSCALL msg=audit(1343161656.822:176692): arch=40000003 syscall=5 success=yes exit=4 a0=884ed98 a1=80c1 a2=1b7 a3=1b7 items=0
 ppid=25058 pid=25059 auid=500 uid=505 gid=505 euid=505 suid=505 fsuid=505 egid=505 sgid=12 fsgid=505 tty=(none) ses=8435 comm="pr
ocmail" exe="/usr/bin/procmail" subj=unconfined_u:system_r:procmail_t:s0 key=(null)
type=AVC msg=audit(1343161656.822:176692): avc:  denied  { write open } for  pid=25059 comm="procmail" name="1343161656.25059_0.vps2" dev=xvdb1 ino=1046404 scontext=unconfined_u:system_r:procmail_t:s0 tcontext=unconfined_u:object_r:mail_home_rw_t:s0 tclass=file
type=AVC msg=audit(1343161656.822:176692): avc:  denied  { create } for  pid=25059 comm="procmail" name="1343161656.25059_0.vps2" scontext=unconfined_u:system_r:procmail_t:s0 tcontext=unconfined_u:object_r:mail_home_rw_t:s0 tclass=file
type=AVC msg=audit(1343161656.822:176692): avc:  denied  { add_name } for  pid=25059 comm="procmail" name="1343161656.25059_0.vps2" scontext=unconfined_u:system_r:procmail_t:s0 tcontext=unconfined_u:object_r:mail_home_rw_t:s0 tclass=dir
type=AVC msg=audit(1343161656.822:176692): avc:  denied  { write } for  pid=25059 comm="procmail" name="tmp" dev=xvdb1 ino=1045675 scontext=unconfined_u:system_r:procmail_t:s0 tcontext=unconfined_u:object_r:mail_home_rw_t:s0 tclass=dir
----
time->Tue Jul 24 20:27:36 2012
type=SYSCALL msg=audit(1343161656.823:176693): arch=40000003 syscall=9 success=yes exit=0 a0=884ed98 a1=884f5a0 a2=884f5a0 a3=884f5c3 items=0 ppid=25058 pid=25059 auid=500 uid=505 gid=505 euid=505 suid=505 fsuid=505 egid=505 sgid=12 fsgid=505 tty=(none) ses=8435 comm="procmail" exe="/usr/bin/procmail" subj=unconfined_u:system_r:procmail_t:s0 key=(null)
type=AVC msg=audit(1343161656.823:176693): avc:  denied  { link } for  pid=25059 comm="procmail" name="1343161656.25059_0.vps2" dev=xvdb1 ino=1046404 scontext=unconfined_u:system_r:procmail_t:s0 tcontext=unconfined_u:object_r:mail_home_rw_t:s0 tclass=file
----
time->Tue Jul 24 20:27:36 2012
type=SYSCALL msg=audit(1343161656.823:176694): arch=40000003 syscall=10 success=yes exit=0 a0=884ed98 a1=884f5a0 a2=0 a3=884f5c3 items=0 ppid=25058 pid=25059 auid=500 uid=505 gid=505 euid=505 suid=505 fsuid=505 egid=505 sgid=12 fsgid=505 tty=(none) ses=8435 comm="procmail" exe="/usr/bin/procmail" subj=unconfined_u:system_r:procmail_t:s0 key=(null)
type=AVC msg=audit(1343161656.823:176694): avc:  denied  { unlink } for  pid=25059 comm="procmail" name="1343161656.25059_0.vps2" dev=xvdb1 ino=1046404 scontext=unconfined_u:system_r:procmail_t:s0 tcontext=unconfined_u:object_r:mail_home_rw_t:s0 tclass=file
type=AVC msg=audit(1343161656.823:176694): avc:  denied  { remove_name } for  pid=25059 comm="procmail" name="1343161656.25059_0.vps2" dev=xvdb1 ino=1046404 scontext=unconfined_u:system_r:procmail_t:s0 tcontext=unconfined_u:object_r:mail_home_rw_t:s0 tclass=dir

Comment 2 Miroslav Grepl 2012-07-25 11:43:54 UTC
I am adding

mta_manage_home_rw(procmail_t)

Comment 3 Miroslav Grepl 2012-08-08 07:18:29 UTC
Fixed in selinux-policy-3.7.19-159.el6

Comment 6 errata-xmlrpc 2013-02-21 08:26:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0314.html