Bug 821483

Summary: SpamAssassin needs write access to spamd_etc_t
Product: Red Hat Enterprise Linux 6 Reporter: Gordon Messmer <gordon.messmer>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2CC: dwalsh, mmalik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.7.19-168.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 08:35:23 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 Gordon Messmer 2012-05-14 16:00:22 UTC
Description of problem:
The spamd process needs access to update razor configuration files.  Users who integrate razor will find log entries such as the following:

type=AVC msg=audit(1337010822.138:931223): avc:  denied  { write } for  pid=688 comm="spamd" name="server.c303.cloudmark.com.conf" dev=dm-0 ino=136915 scontext=system_u:system_r:spamd_t:s0 tcontext=system_u:object_r:spamd_etc_t:s0 tclass=file

Please add write access for spamd_etc_t to the spamd_t context.

Version-Release number of selected component (if applicable):
selinux-policy-3.7.19-126.el6_2.10.noarch
spamassassin-3.3.1-2.el6.x86_64
perl-Razor-Agent-2.85-6.el6.x86_64

Comment 2 Miroslav Grepl 2012-05-15 08:32:34 UTC
We allow read this config files. Where is "server.c303.cloudmark.com.conf" exactly located in the /etc directory?

Is this a startup issue?

Comment 3 Gordon Messmer 2012-05-15 15:36:29 UTC
The file is located in /etc/razor.  restorecon will mark the files as razor_etc_t, which appears to be an alias of spamd_etc_t.

I believe that this is not a startup issue, but razor will update its configuration files during runtime.  As this is normal operation for the program, please update policy to reflect that.

mailfilter.rpr.com:~# restorecon -rv /etc/razor/
restorecon reset /etc/razor context unconfined_u:object_r:spamd_etc_t:s0->unconfined_u:object_r:razor_etc_t:s0
restorecon reset /etc/razor/server.c301.cloudmark.com.conf context system_u:object_r:spamd_etc_t:s0->system_u:object_r:razor_etc_t:s0
...
mailfilter.rpr.com:~# ls -lZ /etc/razor/
lrwxrwxrwx. root   root   unconfined_u:object_r:spamd_etc_t:s0 identity -> identity-ru7Bzeylm5
-rw-------. root   root   unconfined_u:object_r:spamd_etc_t:s0 identity-ru7Bzeylm5
-rw-r--r--. root   root   unconfined_u:object_r:spamd_etc_t:s0 razor-agent.conf
...

Comment 5 RHEL Program Management 2012-07-10 08:19:38 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 6 RHEL Program Management 2012-07-11 01:56:04 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 7 Miroslav Grepl 2012-10-09 21:37:01 UTC
Added.

Comment 12 errata-xmlrpc 2013-02-21 08:35:23 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