Bug 614348

Summary: SELinux is preventing /usr/libexec/dovecot/dovecot-lda "search" access on /var/log.
Product: Red Hat Enterprise Linux 6 Reporter: Jiri Kastner <jkastner>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED CURRENTRELEASE QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: mmalik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: selinux-policy-3.7.19-32.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-10 21:35:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Jiri Kastner 2010-07-14 08:17:01 UTC

SELinux is preventing /usr/libexec/dovecot/dovecot-lda "search" access on

Detailed Description:

[deliver has a permissive type (dovecot_deliver_t). This access was not denied.]

SELinux denied access requested by deliver. It is not expected that this access
is required by deliver and this access may signal an intrusion attempt. It is
also possible that the specific version or configuration of the application is
causing it to require additional access.

Allowing Access:

You can generate a local policy module to allow this access - see FAQ
(http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385) Please file a bug

Additional Information:

Source Context                system_u:system_r:dovecot_deliver_t:s0
Target Context                system_u:object_r:var_log_t:s0
Target Objects                /var/log [ dir ]
Source                        deliver
Source Path                   /usr/libexec/dovecot/dovecot-lda
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           dovecot-2.0-0.8.beta6.20100630.el6
Target RPM Packages           filesystem-2.4.30-2.1.el6
Policy RPM                    selinux-policy-3.7.19-31.el6
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   catchall
Host Name                     (removed)
Platform                      Linux dhcp-25-175.brq.redhat.com
                              2.6.32-44.el6.x86_64 #1 SMP Wed Jul 7 15:47:50 EDT
                              2010 x86_64 x86_64
Alert Count                   327
First Seen                    Tue 13 Jul 2010 06:55:02 PM CEST
Last Seen                     Wed 14 Jul 2010 08:35:01 AM CEST
Local ID                      429348f1-145d-450b-886e-764d23b1e95f
Line Numbers                  

Raw Audit Messages            

node=localhost type=AVC msg=audit(1279089301.710:124): avc:  denied  { search } for  pid=12120 comm="deliver" name="log" dev=sda7 ino=3933736 scontext=system_u:system_r:dovecot_deliver_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=dir

node=localhost type=SYSCALL msg=audit(1279089301.710:124): arch=c000003e syscall=2 success=yes exit=68719476864 a0=2295908 a1=441 a2=180 a3=10 items=0 ppid=12119 pid=12120 auid=4294967295 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=4294967295 comm="deliver" exe="/usr/libexec/dovecot/dovecot-lda" subj=system_u:system_r:dovecot_deliver_t:s0 key=(null)

Comment 1 Jiri Kastner 2010-07-14 08:20:14 UTC
i created var/log/dovecot-deliver.log and /var/log/dovecot-deliver-errors.log and because /usr/libexec/dovecot/deliver is executed under usual account using fetchmail, i assigned go+rw on those files, but selinux doesn't like that.

Comment 3 Daniel Walsh 2010-07-14 12:33:47 UTC
Does doevecot deliver need to write to these files?

Why didn't you create the log files in /var/log/dovecot which would label them correctly. Not that that would necessarily fix the issue.

Miroslav Rawhide has logging_search_logs(dovecot_auth_t) when it looks like it should be deliver_t.

Comment 4 Miroslav Grepl 2010-07-14 14:31:26 UTC
> Miroslav Rawhide has logging_search_logs(dovecot_auth_t) when it looks like it
> should be deliver_t.    

Fixed in selinux-policy-3.7.19-32.el6

Comment 7 releng-rhel@redhat.com 2010-11-10 21:35:18 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.