Bug 681264

Summary: Config file on wrong place
Product: Red Hat Enterprise Linux 6 Reporter: Juraj Marko <jmarko>
Component: mailmanAssignee: Jan Kaluža <jkaluza>
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0CC: nlevinki, ovasik, psklenar
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 683763 (view as bug list) Environment:
Last Closed: 2012-07-10 10:35:44 UTC Type: ---
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: 683763    

Description Juraj Marko 2011-03-01 15:46:37 UTC
Description of problem:

Files mm_cfg.py, mm_cfg.pyc mm_cfg.pyo are located in /usr/lib/mailman/Mailman/. But this file is a config file which should be modified. 

This modification is denied by selinux:
type=SYSCALL msg=audit(1298975286.335:1096098): arch=40000003 syscall=5 success=yes exit=4 a0=bffb4c8b a1=82c1 a2=81a4 a3=bffb5ceb items=0 ppid=9591 pid=9594 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=1807 comm="mailmanctl" exe="/usr/bin/python" subj=unconfined_u:system_r:mailman_mail_t:s0 key=(null)
type=AVC msg=audit(1298975286.335:1096098): avc:  denied  { write } for  pid=9594 comm="mailmanctl" name="mm_cfg.pyc" dev=sda2 ino=2479444 scontext=unconfined_u:system_r:mailman_mail_t:s0 tcontext=unconfined_u:object_r:lib_t:s0 tclass=file
type=AVC msg=audit(1298975286.335:1096098): avc:  denied  { create } for  pid=9594 comm="mailmanctl" name="mm_cfg.pyc" scontext=unconfined_u:system_r:mailman_mail_t:s0 tcontext=unconfined_u:object_r:lib_t:s0 tclass=file
type=AVC msg=audit(1298975286.335:1096098): avc:  denied  { add_name } for  pid=9594 comm="mailmanctl" name="mm_cfg.pyc" scontext=unconfined_u:system_r:mailman_mail_t:s0 tcontext=system_u:object_r:lib_t:s0 tclass=dir

and the file system /usr can be read only on some arch.

Version-Release number of selected component (if applicable):


How reproducible:
100% but the AVC only if config was changed

Steps to Reproduce:
1. install mailman
2. # ll /usr/lib/mailman/Mailman/mm_cfg.py*
-rw-r--r--. 1 root mailman 3880 Feb 24 05:40 /usr/lib/mailman/Mailman/mm_cfg.py
-rw-r--r--. 2 root mailman 1180 Jun 21  2010 /usr/lib/mailman/Mailman/mm_cfg.pyc
-rw-r--r--. 1 root mailman 3864 Jun 21  2010 /usr/lib/mailman/Mailman/mm_cfg.py.dist
-rw-r--r--. 2 root mailman 1180 Jun 21  2010 /usr/lib/mailman/Mailman/mm_cfg.pyo
  
Actual results:
Config file in /usr

Expected results:
Config file in /etc and onli link in /usr

Additional info:
Same bug on rhel 5 and 6

Comment 1 RHEL Program Management 2011-03-01 15:58:54 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 2 Jan Kaluža 2011-03-14 16:09:23 UTC
I've tried to write a patch for this bug and unfortunately "ln -s /usr/lib/mailman/Mailman/mm_cfg.py /etc/mailman/mm_cfg.py" won't fix this issue, because python tries to create .pyc/.pyo even for symlinks.

So the only thing we can fix by suggested change is that config file won't be located in /usr/lib filesystem, but AVC denials will be still there.

Comment 6 RHEL Program Management 2012-07-10 10:35:44 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.