Bug 468207 - Postfix 2.5.x. fails to start due to lack of SElinux permissions for data_dir (/var/lib/postfix [default])
Summary: Postfix 2.5.x. fails to start due to lack of SElinux permissions for data_dir...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy-targeted
Version: 8
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-23 15:31 UTC by Tristan Santore
Modified: 2008-11-26 17:37 UTC (History)
1 user (show)

Fixed In Version: F8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-26 17:37:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tristan Santore 2008-10-23 15:31:19 UTC
Description of problem:

SElinux does not allow the updated Postfix to access, create, write to, etc.. access to /var/lib/postfix. This directory is now the default DATA dir as specified by data_dir in the config (see manual). Postfix fails to start as it cannot create the master.lock file. Further other files are also placed into the data_dir now, such as the random for the TLS sessions. Other files are also placed within the new data_dir. 
Version-Release number of selected component (if applicable):
selinux-policy-targeted-3.0.8-117.fc8
libselinux-2.0.43-1.fc8
selinux-policy-3.0.8-117.fc8
postfix-2.5.5-1.fc8
How reproducible:
Update postfix-2.4.x to 2.5

Steps to Reproduce:
1.yum update or rpm -Uvh, if using recompiled postfix for mysql support
2. service postfix restart (will say ok, but fail)
3. service postfix status (will show not running)
4. Logs in /var/log/maillog specify permissions issues to access /var/lib/postfix
5. Logs in /var/log/messages show avc denials corresponding to issue


Actual results:
Postfix wont start.

Expected results:
Postfix should start and create master.lock file and prng_exch [for TLS.] (maybe others depending on setup, see manual)


Additional info:

policy_module(mypostfix, 0.0.1)
type postfix_var_lib_t;
files_type(postfix_var_lib_t)
require { type postfix_master_t; }
manage_dirs_pattern(postfix_master_t, postfix_var_lib_t, postfix_var_lib_t)
manage_files_pattern(postfix_master_t, postfix_var_lib_t, postfix_var_lib_t)
files_search_var_lib(postfix_master_t)
files_var_lib_filetrans(postfix_master_t, postfix_var_lib_t, {dir file})

Fixes issue. Credit to domg472 #selinux and #fedora-selinux.

Daniel, you might have seen the irc chatter, if not, heres the bugzilla.

Regards,
Tristan

P.s.: Further reading by another user.
http://engardelinux.org/modules/index/list_archives.cgi?list=selinux&page=0310.html&month=2008-06

Comment 1 Daniel Walsh 2008-10-23 18:37:25 UTC
Fixed in selinux-policy-3.0.8-122.fc8

Comment 2 Bug Zapper 2008-11-26 11:15:32 UTC
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Jon Stanley 2008-11-26 17:37:54 UTC
As this bug is in MODIFIED, Fedora believes that a fix has been committed that resolves the problem listed in this bug report.

If this is not the case, please re-open this report, noting the version of the package that you reproduced the bug against.

Thanks for the report!


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