Bug 435140 - SELinux Administration utility doesn't handle file specificatoins correctly
Summary: SELinux Administration utility doesn't handle file specificatoins correctly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: policycoreutils
Version: 5.1
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Daniel Walsh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-02-27 16:32 UTC by David A. Cafaro
Modified: 2009-01-20 22:00 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-20 22:00:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0206 0 normal SHIPPED_LIVE policycoreutils bug fix update 2009-01-20 16:06:12 UTC

Description David A. Cafaro 2008-02-27 16:32:29 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12

Description of problem:
When using the GUI SELinux Administration toole (system-config-selinux) to add File Labeling objects you are unable to enter in (/.*)? at the end of a file path.

The error you get is:

sh: -c: line 0: syntax error near unexpected token `('
sh: -c: `{ semanage fcontext -a -t mysqld_db_t -r so -f 'all files' /home/database/mysql(/.*)?; } 2>&1'

If you run semanage manually on the command line adding single quotes to the file path, the command works properly and the context is added, example:

[root@server ~]# semanage fcontext -a -t mysqld_db_t -r so -f 'all files' '/home/database/mysql(/.*)?'
[root@server ~]# 

Version-Release number of selected component (if applicable):
policycoreutils-gui-1.33.12012.el5

How reproducible:
Always


Steps to Reproduce:
1. Load SELinux Administration
2. Try to add a new file context to File Labeling that contains (/.*)? at the end
3. What the error window pop up 
(system-config-selinx must be launched from the command line to easily see the error listed in the terminal as the gui pop-up windows just has a red stop sign and OK button)

Actual Results:
The context was not added, and I received an error.

Expected Results:
the context should have been added

Additional info:
Looks like the context string just needs to be placed in single quotes before being sent to the command line.

Comment 1 Daniel Walsh 2008-02-28 14:57:50 UTC
Fixed in policycoreutils-1.33.12-15.el5.src.rpm

Possible release via zstream?

Comment 2 RHEL Program Management 2008-06-04 22:46:21 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 4 Daniel Walsh 2008-09-17 19:11:53 UTC
Fixed in policycoreutils-1.33.12-14.1.el5

Comment 8 errata-xmlrpc 2009-01-20 22:00:34 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0206.html


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