Bug 473856 - restorecon does not work if directory context was added with a trailing slash
restorecon does not work if directory context was added with a trailing slash
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: policycoreutils (Show other bugs)
10
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-30 22:53 EST by Murray McAllister
Modified: 2015-01-04 17:35 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-01 08:47:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
semanage tests (1.16 KB, text/plain)
2008-11-30 22:53 EST, Murray McAllister
no flags Details

  None (edit)
Description Murray McAllister 2008-11-30 22:53:18 EST
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 08:47:36 EST
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.