Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 923340

Summary: SELinux is preventing /usr/bin/python from write access on the directory /usr/lib/mailman/Mailman
Product: Red Hat Enterprise Linux 6 Reporter: Robert Scheck <redhat-bugzilla>
Component: mailmanAssignee: Jan Kaluža <jkaluza>
Status: CLOSED WORKSFORME QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: dapospis, dwalsh, mmalik, psklenar, redhat-bugzilla, robert.scheck, ssekidde
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-20 07:26:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1070830, 1159820    

Description Robert Scheck 2013-03-19 15:47:14 UTC
Description of problem:
type=AVC msg=audit(1360594932.789:23973): avc:  denied  { write } for  pid=5530 comm="mailmanctl" name="Mailman" dev=vda1 ino=413673 scontext=system_u:system_r:mailman_mail_t:s0 tcontext=system_u:object_r:lib_t:s0 tclass=dir
type=SYSCALL msg=audit(1360594932.789:23973): arch=x86_64 syscall=unlink success=no exit=EACCES a0=7fffcc495520 a1=7f00e7784fe7 a2=510809f0 a3=7fffcc4951d0 items=0 ppid=5529 pid=5530 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=mailmanctl exe=/usr/bin/python subj=system_u:system_r:mailman_mail_t:s0 key=(null)

Version-Release number of selected component (if applicable):
python-2.6.6-29.el6_3.3.x86_64
selinux-policy-3.7.19-155.el6_3.14.noarch

How reproducible:
No idea, just shows up from time to time on all servers running mailman from
RHEL.
  
Actual results:
AVC denied as above.

Expected results:
No AVC denied anymore.

Additional info:
I assume this is /usr/lib/mailman/bin/mailmanctl and this is likely related
to:

-rw-r--r--. 2 root mailman 1208 11. Feb 16:02 /usr/lib/mailman/Mailman/mm_cfg.pyc
-rw-r--r--. 2 root mailman 1208 11. Feb 16:02 /usr/lib/mailman/Mailman/mm_cfg.pyo

(at least this matches from timestamp in setroubleshoot-server e-mail).

Comment 1 Robert Scheck 2013-03-19 15:50:46 UTC
Aside of this, shouldn't this be avoided by /usr/bin/mailman-update-cfg?

Comment 2 Robert Scheck 2013-03-19 15:57:03 UTC
Cross-filed case #00808134 in the Red Hat customer portal.

Comment 3 Daniel Walsh 2013-03-20 01:03:10 UTC
Robert could this be python trying to rewrite is compiled code? Into the Mailman directory under /usr/lib/python?

Comment 4 Robert Scheck 2013-03-20 08:06:41 UTC
Daniel, hum? Why /usr/lib/python? The only changed files I was able to guess
related to mailman were these mentioned above. But I even don't know why this
should happen that way it seems to happen. I thought, mailman-update-cfg(1)
was done because of this.

Maybe mailman package maintainer has a wild guess?

Comment 5 Daniel Walsh 2013-03-20 14:13:31 UTC
I am guessing, since there was a lib_t that it would be under /usr/lib or /usr/lib64.

Since mailman is writen in python I figure this is something to do with python trying to write compiled code into a lib_t directory.

Comment 6 Daniel Walsh 2013-03-20 14:28:33 UTC
Ok sekidde informed me that I am mistaken.

I would figure this is python writing content under /usr/lib/mailman.

Comment 7 Miroslav Grepl 2013-07-17 13:34:52 UTC
Robert,
where is "Mailman" dir located in /usr/lib/mailman?

Comment 8 Robert Scheck 2013-08-07 09:14:41 UTC
It's actually /usr/lib/mailman/Mailman, so directly.

Comment 9 Daniel Walsh 2013-08-07 18:07:07 UTC
Robert if you run python on the py files in this directory the problem will go away.

Comment 10 RHEL Program Management 2013-10-14 04:04:47 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 11 Jan Kaluža 2014-01-14 08:51:43 UTC
This could be theoretically fixed by running "python" on this config file in Mailman initscript before executing the mailman. This should regenerate the config file.

Comment 12 Jan Kaluža 2014-01-17 12:33:45 UTC
*** Bug 1054699 has been marked as a duplicate of this bug. ***

Comment 13 Jan Kaluža 2014-01-20 10:15:12 UTC
*** Bug 1054688 has been marked as a duplicate of this bug. ***

Comment 14 Dalibor Pospíšil 2014-01-20 13:05:24 UTC
(In reply to Jan Kaluža from comment #11)
> This could be theoretically fixed by running "python" on this config file in
> Mailman initscript before executing the mailman. This should regenerate the
> config file.

This solution seems to be used in RHEL-7 also.

Comment 15 Jan Kaluža 2014-02-14 09:24:30 UTC
*** Bug 754115 has been marked as a duplicate of this bug. ***

Comment 17 Jan Kaluža 2014-12-01 08:57:24 UTC
Hi, are you still able to reproduce this issue on RHEL-6.5? I'm not able to reproduce it right now :(.

Comment 18 Jan Kaluža 2015-02-20 07:26:41 UTC
I'm closing this bug as works for me, if you are still able to reproduce it, feel free to reopen the bug.