summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2009-11-23 17:40:03 -0800
committerJames Turnbull <james@lovedthanlost.net>2009-11-25 09:01:19 +1100
commitdc8812c371810aa1d3c723d8b42b9773d1ded851 (patch)
tree07ff7df47c142ef1ccd166962e2c2de1a95c42fa /lib/puppet
parent57632a0497183b2ec205b83eea939c3159e44925 (diff)
downloadpuppet-dc8812c371810aa1d3c723d8b42b9773d1ded851.tar.gz
puppet-dc8812c371810aa1d3c723d8b42b9773d1ded851.tar.xz
puppet-dc8812c371810aa1d3c723d8b42b9773d1ded851.zip
Fixing 2792 selinux tries to set properties on unsupported filesystes
Check that a specific file supports selinux properties before trying to set them. This patch is functionally identical to the one Darrell Fuhriman submitted with the bug report. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/util/selinux.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/util/selinux.rb b/lib/puppet/util/selinux.rb
index bdf44152b..25d86f77e 100644
--- a/lib/puppet/util/selinux.rb
+++ b/lib/puppet/util/selinux.rb
@@ -91,7 +91,7 @@ module Puppet::Util::SELinux
# I believe that the OS should always provide at least a fall-through context
# though on any well-running system.
def set_selinux_context(file, value, component = false)
- unless selinux_support?
+ unless selinux_support? && selinux_label_support?(file)
return nil
end