Bug 1410733

Summary: fixfiles does not repair SELinux contexts in paths which contain at least 1 space
Product: Red Hat Enterprise Linux 6 Reporter: Milos Malik <mmalik>
Component: policycoreutilsAssignee: Petr Lautrbach <plautrba>
Status: CLOSED WONTFIX QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.9CC: dwalsh, lvrabec, mgrepl, mmalik, plautrba, rmonther, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1717319 (view as bug list) Environment:
Last Closed: 2017-07-17 08:06:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milos Malik 2017-01-06 09:39:47 UTC
Description of problem:
* the problem appears if you run fixfiles on a path which contains at least 1 space

Version-Release number of selected component (if applicable):
policycoreutils-2.0.83-30.1.el6_8.x86_64

How reproducible:
* always

Steps to Reproduce:
# mkdir space\ in\ the\ name
# s -dZ space\ in\ the\ name
drwxr-xr-x. root root unconfined_u:object_r:admin_home_t:s0 space in the name
# chcon -t tmp_t space\ in\ the\ name
# ls -dZ space\ in\ the\ name
drwxr-xr-x. root root unconfined_u:object_r:tmp_t:s0   space in the name
# fixfiles restore ./space\ in\ the\ name
/sbin/restorecon:  lstat(./space) failed:  No such file or directory
/sbin/restorecon:  lstat(in) failed:  No such file or directory
/sbin/restorecon:  lstat(the) failed:  No such file or directory
/sbin/restorecon:  lstat(name) failed:  No such file or directory
# ls -dZ space\ in\ the\ name
drwxr-xr-x. root root unconfined_u:object_r:tmp_t:s0   space in the name
# restorecon -Rv /root
restorecon reset /root/space in the name context unconfined_u:object_r:tmp_t:s0->unconfined_u:object_r:admin_home_t:s0
#

Actual results:
* files/directories with spaces in their names are skipped

Expected results:
* files/directories with spaces in their names are handled correctly

Comment 2 Petr Lautrbach 2017-01-06 10:12:36 UTC
Is this considered a high severity issue? If not, it doesn't meet Production phase 2 criteria and I will have to close it.

Comment 3 Milos Malik 2017-07-17 08:05:01 UTC
This is not a high severity issue.