Bug 693810 - Targeted policy doesn't fit new drupal* installations
Summary: Targeted policy doesn't fit new drupal* installations
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.0
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-05 15:57 UTC by Paul W. Frields
Modified: 2012-10-16 11:22 UTC (History)
3 users (show)

Fixed In Version: selinux-policy-3.7.19-98.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 09:46:17 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1511 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2011-12-06 00:39:17 UTC

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


Note You need to log in before you can comment on or make changes to this bug.