From 78bcee9a50c40787236104030be1db6873437163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Tue, 23 Apr 2013 08:04:29 +0300 Subject: [PATCH] Ugly kludge to selinux::manage_fcontext to handle paths with escaped characters. --- selinux/manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selinux/manifests/init.pp b/selinux/manifests/init.pp index fc636e5..1e7a490 100644 --- a/selinux/manifests/init.pp +++ b/selinux/manifests/init.pp @@ -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"], }