Hide Forgot
Description of problem: Almost all Mailman operations fail with various error messages, generating AVCs. Version-Release number of selected component (if applicable): selinux-policy-targeted-3.9.16-51.fc15.noarch mailman-2.1.14-6.fc15.x86_64 Sample AVC: type=AVC msg=audit(1331587694.525:759756): avc: denied { write } for pid=19841 comm="python" name="mailman" dev=tmpfs ino=13342 scontext=system_u:system_r:mailman_cgi_t:s0 tcontext=system_u:object_r:var_run_t:s0 tclass=dir This appears to be related to the labelling on the mailman directories in /run: drwxrwsr-x. root mailman system_u:object_r:var_run_t:s0 /run/lock/mailman/ drwxrwsr-x. root mailman system_u:object_r:mailman_lock_t:s0 /run/mailman/ ... which both seem incorrect, but especially /run/lock/mailman (I would have expected mailman_lock_t to have belonged to the /run/mailman directory.)
Note: file_contexts contains: /var/run/mailman(/.*)? system_u:object_r:mailman_lock_t:s0 /var/lock/mailman(/.*)? system_u:object_r:mailman_lock_t:s0 ... and file_context.subs contains: /run/lock /var/lock /run /var/run /var/run/lock /var/lock
FWIW, an explicit: chcon -R system_u:object_r:mailman_lock_t:s0 /run/lock/mailman ... worked, at least transiently; however, restorecon -n -v -R /run indicates it would like to override the label: restorecon reset /run/lock/mailman context system_u:object_r:mailman_lock_t:s0->system_u:object_r:var_run_t:s0 restorecon reset /run/lock/mailman/master-qrunner.terminus.zytor.com.24941 context system_u:object_r:mailman_lock_t:s0->system_u:object_r:var_run_t:s0 restorecon reset /run/lock/mailman/master-qrunner context system_u:object_r:mailman_lock_t:s0->system_u:object_r:var_run_t:s0 restorecon reset /run/lock/subsys/mailman context system_u:object_r:initrc_var_run_t:s0->system_u:object_r:var_run_t:s0
semanage fcontext -a -t mailman_lock_t '/var/lock/mailmain(/.*)?' Will fix this. This is the labeling we have in F16 and F17.
I see we have /var/lock/mailman(/.*)? gen_context(system_u:object_r:mailman_lock_t,s0) in F15.
Yes, this is the confusing bit... it *looks* like it should be correct based on the file_context/file_context.subs files, but it doesn't actually work as expected. I'm wondering if the problem is with rules conflicting with the wrong priority?
If you execute $ yum reinstall selinux-policy-targeted does it complain on reinstall?
No, but the problem is still there.
My system just updated to selinux-policy-targeted-3.9.16-52.fc15.noarch, and the problem reappeared (presumably due to relabel), so this problem is still present.
What does matchpathcon /var/lock/mailman say? ls -lZ /var/lock/mailman
[root@terminus ~]# restorecon -v -R /run restorecon reset /run/lock/mailman context system_u:object_r:mailman_lock_t:s0->system_u:object_r:var_run_t:s0 restorecon reset /run/lock/subsys/spamd context system_u:object_r:initrc_var_run_t:s0->system_u:object_r:var_run_t:s0 restorecon reset /run/lock/subsys/mysqld context system_u:object_r:initrc_var_run_t:s0->system_u:object_r:var_run_t:s0 restorecon reset /run/lock/subsys/auditd context system_u:object_r:initrc_var_run_t:s0->system_u:object_r:var_run_t:s0 restorecon reset /run/lock/subsys/mdmonitor context system_u:object_r:initrc_var_run_t:s0->system_u:object_r:var_run_t:s0 restorecon reset /run/lock/subsys/sshd context system_u:object_r:initrc_var_run_t:s0->system_u:object_r:var_run_t:s0 [root@terminus ~]# matchpathcon /var/lock/mailman /var/lock/mailman system_u:object_r:mailman_lock_t:s0 [root@terminus ~]# ls -alZ /var/lock/mailman drwxrwsr-x. root mailman system_u:object_r:var_run_t:s0 . drwxr-xr-x. root root system_u:object_r:var_run_t:s0 .. [root@terminus ~]# chcon -R system_u:object_r:mailman_lock_t:s0 /run/lock/mailman [root@terminus ~]# matchpathcon /var/lock/mailman /var/lock/mailman system_u:object_r:mailman_lock_t:s0 [root@terminus ~]# ls -alZ /var/lock/mailman drwxrwsr-x. root mailman system_u:object_r:mailman_lock_t:s0 . drwxr-xr-x. root root system_u:object_r:var_run_t:s0 .. [root@terminus ~]# service mailman start Starting mailman (via systemctl): [ OK ] [root@terminus ~]# ls -alZ /var/lock/mailman drwxrwsr-x. root mailman system_u:object_r:mailman_lock_t:s0 . drwxr-xr-x. root root system_u:object_r:var_run_t:s0 .. -rw-rw-r--. mailman mailman system_u:object_r:mailman_lock_t:s0 master-qrunner -rw-rw-r--. mailman mailman system_u:object_r:mailman_lock_t:s0 master-qrunner.terminus.zytor.com.3148 [root@terminus ~]#
On the other hand... [root@terminus ~]# matchpathcon /run/lock/mailman /run/lock/mailman system_u:object_r:var_run_t:s0 Keep in mind that: [root@terminus ~]# ls -l /var/lock lrwxrwxrwx. 1 root root 11 Sep 10 2011 /var/lock -> ../run/lock ... but the file_context.subs should handle that, no?
Ah... Reversing the order of the top two patters in file_context.subs solved the problem: [root@terminus files]# cat file_contexts.subs /run /var/run /run/lock /var/lock /pub/git /srv/git /home/ftp/pub/git /srv/git /var/run/lock /var/lock /home/www /srv/www [root@terminus files]# matchpathcon /run/lock/mailman /run/lock/mailman system_u:object_r:mailman_lock_t:s0 I don't know if this is local to my system or part of the file_context.subs that was shipped with the system... I thought it was the latter, but since I have added patterns to it it might have ignored updates.
This message is a notice that Fedora 15 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 15. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At this time, all open bugs with a Fedora 'version' of '15' have been closed as WONTFIX. (Please note: Our normal process is to give advanced warning of this occurring, but we forgot to do that. A thousand apologies.) Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, feel free to reopen this bug and simply change the 'version' to a later Fedora version. Bug Reporter: Thank you for reporting this issue and we are sorry that we were unable to fix it before Fedora 15 reached 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, you are encouraged to click on "Clone This Bug" (top right of this page) and open it against that version of Fedora. 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