diff options
author | Sean E. Millichamp <sean@bruenor.org> | 2008-10-14 16:01:28 -0400 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2008-10-17 08:18:01 +1100 |
commit | d4df36126fa62406c2cbb7a55b18234032da156b (patch) | |
tree | e19d1f5cd33415ade181ebf49bd7663c8ea96562 /lib/puppet/util/selinux.rb | |
parent | dedf0cdce952e36bcdccfc88b1efc33d9f5eaddb (diff) | |
download | puppet-d4df36126fa62406c2cbb7a55b18234032da156b.tar.gz puppet-d4df36126fa62406c2cbb7a55b18234032da156b.tar.xz puppet-d4df36126fa62406c2cbb7a55b18234032da156b.zip |
Use fully qualified paths when calling binaries, adjust chcon call to use Puppet's execute() function.
Diffstat (limited to 'lib/puppet/util/selinux.rb')
-rw-r--r-- | lib/puppet/util/selinux.rb | 10 |
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 |