Ugly kludge to selinux::manage_fcontext to handle paths with escaped characters.

This commit is contained in:
Timo Mkinen 2013-04-23 08:04:29 +03:00
parent 04990fc910
commit 78bcee9a50

View file

@ -183,7 +183,7 @@ define selinux::manage_fcontext($type, $recurse = true) {
exec { "semanage fcontext -a -t '${type}' '${name}'":
path => "/bin:/usr/bin:/sbin:/usr/sbin",
unless => "matchpathcon `echo '${name}' | sed -e 's/(.*$//'` | egrep -q ':${type}(:s[0-9]*)?$'",
unless => "matchpathcon `echo '${name}' | sed -e 's/(.*$//' -e 's/\\\\\//g'` | egrep -q ':${type}(:s[0-9]*)?$'",
notify => Exec["restorecon ${name}"],
require => Class["selinux::tools"],
}