summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/util/selinux.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/puppet/util/selinux.rb b/lib/puppet/util/selinux.rb
index d91a6943a..0a4af3ca1 100644
--- a/lib/puppet/util/selinux.rb
+++ b/lib/puppet/util/selinux.rb
@@ -20,7 +20,7 @@ module Puppet::Util::SELinux
end
context = ""
begin
- execpipe("stat -c %C #{file}") do |out|
+ execpipe("/usr/bin/stat -c %C #{file}") do |out|
out.each do |line|
context << line
end
@@ -106,13 +106,7 @@ module Puppet::Util::SELinux
flag = ""
end
- Puppet.debug "Running chcon -h #{flag} #{value} #{file}"
- retval = system("chcon -h #{flag} #{value} #{file}")
- unless retval
- error = Puppet::Error.new("failed to chcon %s" % [@resource[:path]])
- raise error
- return false
- end
+ execute(["/usr/bin/chcon","-h",flag,value,file])
return true
end