Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 549550 - mail-mta/postfix-3.0.0 post-install incorrectly checks parameter shlib_directory
Summary: mail-mta/postfix-3.0.0 post-install incorrectly checks parameter shlib_directory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-15 11:36 UTC by Sven Vermeulen (RETIRED)
Modified: 2015-07-03 17:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Vermeulen (RETIRED) gentoo-dev 2015-05-15 11:36:21 UTC
When postfix starts up, it calls the post-install script inside /usr/libexec/postfix. This script has some logic to validate if a minimum set of parameters is defined in the configuration file (main.cf) and, if not, will write the default value of those parameters in the main configuration file.

The list of parameters is defined in the MOST_PARAMETERS variable inside this script. One of those parameters is "shlib_directory" which has the following value:

  shlib_directory = /usr/lib64/postfix/${mail_version}

The check in post-install evaluates the key and value which, given the $ sign, always misses. As a result, this code is always triggered and on start-up it always rewrites the main.cf file.

For security reasons, many people will not want the daemons to write their own configuration file. With the default SELinux policy, this is also not allowed. Sadly, this results in postfix on SELinux systems to refuse to start.

I personally removed shlib_directory from MOST_PARAMETERS to quickly resolve it (I would rather not hardcode the mail_version as that changes with every postfix upgrade) although it is probably preferred to fix the check so that ${mail_version} is not evaluated itself.

Reproducible: Always
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2015-05-15 11:43:56 UTC
I misinterpreted the reason why it writes - apparently if all the values are default, it will not force-write the settings. However, because of shlib_directory is always finds that there is a deviation and writes it.

If I remove shlib_directory from MOST_PARAMETERS none of them are force-written to the main.cf file (as they are all default values).
Comment 2 Julian Reich 2015-06-02 21:10:15 UTC
This bug was fixed upstream in Postfix 3.0.1: <http://www.postfix.org/announcements/postfix-3.0.1.html>.
Comment 3 Sven Vermeulen (RETIRED) gentoo-dev 2015-07-03 17:54:42 UTC
I can verify that 3.0.1 starts properly