Bug 678745 - SELinux is preventing /usr/libexec/postfix/local from 'search' accesses on the directory /var/lib/logcheck.
Summary: SELinux is preventing /usr/libexec/postfix/local from 'search' accesses on th...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 14
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: setroubleshoot_trace_hash:24fbfcdb6fb...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-19 08:43 UTC by Till Maas
Modified: 2011-03-22 18:52 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.9.7-37.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-22 18:52:05 UTC
Type: ---


Attachments (Terms of Use)

Description Till Maas 2011-02-19 08:43:19 UTC
SELinux is preventing /usr/libexec/postfix/local from 'search' accesses on the directory /var/lib/logcheck.

*****  Plugin catchall (100. confidence) suggests  ***************************

If you believe that local should be allowed search access on the logcheck directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# grep local /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:postfix_local_t:s0
Target Context                system_u:object_r:logwatch_cache_t:s0
Target Objects                /var/lib/logcheck [ dir ]
Source                        local
Source Path                   /usr/libexec/postfix/local
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           postfix-2.7.1-1.fc14
Target RPM Packages           logcheck-1.3.13-4.fc14
Policy RPM                    selinux-policy-3.9.7-29.fc14
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.35.11-83.fc14.x86_64 #1
                              SMP Mon Feb 7 07:06:44 UTC 2011 x86_64 x86_64
Alert Count                   35
First Seen                    Do 17 Feb 2011 11:02:03 CET
Last Seen                     Fr 18 Feb 2011 22:02:03 CET
Local ID                      2f70c9c8-d269-45dc-bae1-50421cd24d00

Raw Audit Messages
type=AVC msg=audit(1298062923.892:53709): avc:  denied  { search } for  pid=9879 comm="local" name="logcheck" dev=dm-2 ino=267615 scontext=system_u:system_r:postfix_local_t:s0 tcontext=system_u:object_r:logwatch_cache_t:s0 tclass=dir


type=SYSCALL msg=audit(1298062923.892:53709): arch=x86_64 syscall=lstat success=no exit=ENOENT a0=7fc6cb099aa0 a1=7fffb73b79e0 a2=7fffb73b79e0 a3=1 items=0 ppid=2605 pid=9879 auid=4294967295 uid=0 gid=0 euid=480 suid=0 fsuid=480 egid=461 sgid=0 fsgid=461 tty=(none) ses=4294967295 comm=local exe=/usr/libexec/postfix/local subj=system_u:system_r:postfix_local_t:s0 key=(null)

Hash: local,postfix_local_t,logwatch_cache_t,dir,search

audit2allow

#============= postfix_local_t ==============
allow postfix_local_t logwatch_cache_t:dir search;

audit2allow -R

#============= postfix_local_t ==============
allow postfix_local_t logwatch_cache_t:dir search;

Comment 1 Daniel Walsh 2011-02-21 23:20:18 UTC
Do you have logwatch sending mail through postfix?

Comment 2 Till Maas 2011-02-24 19:08:10 UTC
(In reply to comment #1)
> Do you have logwatch sending mail through postfix?

Here it is logcheck, not logwatch, but yes, both send mail here through postfix.

Comment 3 Daniel Walsh 2011-02-24 19:19:42 UTC
Ok, what I think is happening is the current working directory is /var/lib/logcheck when the postfix command is executed causing postfix to search for the current directory creating this AVC.

Miroslav can you add

optional_policy(`
	logwatch_search_cache_dir(mailserver_delivery)
')


to mta.te for F13 and F14

Comment 4 Miroslav Grepl 2011-02-25 11:51:29 UTC
Fixed in selinux-policy-3.9.7-32.fc14

Comment 5 Fedora Update System 2011-03-18 15:07:04 UTC
selinux-policy-3.9.7-34.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-34.fc14

Comment 6 Fedora Update System 2011-03-21 08:45:03 UTC
selinux-policy-3.9.7-37.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.7-37.fc14

Comment 7 Fedora Update System 2011-03-22 18:50:38 UTC
selinux-policy-3.9.7-37.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.