Bug 473856 - restorecon does not work if directory context was added with a trailing slash
Summary: restorecon does not work if directory context was added with a trailing slash
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 10
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-12-01 03:53 UTC by Murray McAllister
Modified: 2015-01-04 22:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-12-01 13:47:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
semanage tests (1.16 KB, text/plain)
2008-12-01 03:53 UTC, Murray McAllister
no flags Details

Description Murray McAllister 2008-12-01 03:53:18 UTC
Created attachment 325167 [details]
semanage tests

Description of problem:
1. semanage fcontext -a -t samba_share_t /test
2. restorecon -R -v /test
Changes /test type to samba_share_t. Note: no slash on the end of "/test".

1. semanage fcontext -a -t samba_share_t /test/
2. restorecon -R -v /test

/test still uses default_t type. Note: trailing slash, "/test/".

See attached for full steps.


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

policycoreutils-2.0.57-11.fc10.i386
selinux-policy-3.5.13-18.fc10.noarch
selinux-policy-targeted-3.5.13-18.fc10.noarch
libselinux-utils-2.0.73-1.fc10.i386
libselinux-python-2.0.73-1.fc10.i386
libselinux-2.0.73-1.fc10.i386

Comment 1 Daniel Walsh 2008-12-01 13:47:36 UTC
The problem here is you are adding a path that is a regular expression. 

So from a regex point of view /test does not match /test/.

Since there is lots of examples where this is going to fail, I am going to close this as wontfix.


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