Bug 435140 - SELinux Administration utility doesn't handle file specificatoins correctly
SELinux Administration utility doesn't handle file specificatoins correctly
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: policycoreutils (Show other bugs)
x86_64 Linux
low Severity medium
: rc
: ---
Assigned To: Daniel Walsh
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2008-02-27 11:32 EST by David A. Cafaro
Modified: 2009-01-20 17:00 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-20 17:00:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

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

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):

How reproducible:

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 09:57:50 EST
Fixed in policycoreutils-1.33.12-15.el5.src.rpm

Possible release via zstream?
Comment 2 RHEL Product and Program Management 2008-06-04 18:46:21 EDT
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
Comment 4 Daniel Walsh 2008-09-17 15:11:53 EDT
Fixed in policycoreutils-1.33.12-14.1.el5
Comment 8 errata-xmlrpc 2009-01-20 17:00:34 EST
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.


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