Bug 693810

Summary: Targeted policy doesn't fit new drupal* installations
Product: Red Hat Enterprise Linux 6 Reporter: Paul W. Frields <stickster>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: high Docs Contact:
Priority: high    
Version: 6.0CC: dwalsh, gwync, mmalik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.7.19-98.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 09:46:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Paul W. Frields 2011-04-05 15:57:32 UTC
Description of problem:
The Fedora version of targeted policy includes the following file contexts:
/etc/selinux/targeted/contexts/files/file_contexts:/etc/drupal(/.*)?    system_u:object_r:httpd_sys_rw_content_t:s0
/etc/selinux/targeted/contexts/files/file_contexts:/var/lib/drupal(/.*)?        system_u:object_r:httpd_sys_rw_content_t:s0
/etc/selinux/targeted/contexts/files/file_contexts:/usr/share/drupal(/.*)?      system_u:object_r:httpd_sys_content_t:s0

The RHEL version, selinux-policy-targeted.noarch 0:3.7.19-54.el6_0.5, includes the following:
/etc/drupal(/.*)?       system_u:object_r:httpd_sys_rw_content_t:s0
/var/lib/drupal(/.*)?   system_u:object_r:httpd_sys_rw_content_t:s0
/usr/share/drupal(/.*)? system_u:object_r:httpd_sys_content_t:s0

Not sure if this is something we should address in a policy module in the new Drupal packages?  I can work with Jon, the maintainer, if so.  Chances are we'll run into the same thing in the upcoming Drupal 7 series.

Comment 2 RHEL Program Management 2011-04-05 16:04:05 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

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.

Comment 3 Daniel Walsh 2011-04-05 16:36:09 UTC
Paul, I am old and blind, but they look the same to me.

Comment 4 Daniel Walsh 2011-04-05 16:37:28 UTC
I think you meant you wanted

-/etc/drupal(/.*)?			gen_context(system_u:object_r:httpd_sys_rw_content_t,s0)
+/etc/drupal(6)?(/.*)?			gen_context(system_u:object_r:httpd_sys_rw_content_t,s0)
-/usr/share/drupal(/.*)?			gen_context(system_u:object_r:httpd_sys_content_t,s0)
+/usr/share/drupal(6)?(/.*)?			gen_context(system_u:object_r:httpd_sys_content_t,s0)
-/var/lib/drupal(/.*)?			gen_context(system_u:object_r:httpd_sys_rw_content_t,s0)
+/var/lib/drupal(6)?(/.*)?			gen_context(system_u:object_r:httpd_sys_rw_content_t,s0)

Comment 5 Paul W. Frields 2011-04-05 17:57:55 UTC
Yes -- in other words, need the 6 to capture the "drupal6" directories.  FYI there is a drupal7 package on the way which will use "drupal7" to allow parallel installation of the web app core and modules.

Comment 6 Paul W. Frields 2011-04-05 17:58:46 UTC
Sorry, I had inadvertently pasted from the wrong sources. Looks like youth isn't all it's cracked up to be. ;-)

Comment 8 Daniel Walsh 2011-04-05 19:00:48 UTC
Lets just add


/etc/drupal.* 
gen_context(system_u:object_r:httpd_sys_rw_content_t,s0)
/usr/share/drupal.* 
gen_context(system_u:object_r:httpd_sys_content_t,s0)
/var/lib/drupal.*  
gen_context(system_u:object_r:httpd_sys_rw_content_t,s0)

Comment 10 Miroslav Grepl 2011-06-14 14:05:37 UTC
Fixed in selinux-policy-3.7.19-98.el6

Comment 13 errata-xmlrpc 2011-12-06 09:46:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1511.html