Fixed #1852 - Correct behaviour when no SELinux bindings
This commit is contained in:
Родитель
15d4360859
Коммит
b27fccd434
|
@ -1,4 +1,6 @@
|
|||
0.25.x
|
||||
Fixed #1852 - Correct behaviour when no SELinux bindings
|
||||
|
||||
Updated Red Hat spec file 0.24.7
|
||||
|
||||
0.24.7
|
||||
|
|
|
@ -44,6 +44,14 @@ module Puppet
|
|||
return property_default
|
||||
end
|
||||
|
||||
def insync?(value)
|
||||
if not selinux_support?
|
||||
debug("SELinux bindings not found. Ignoring parameter.")
|
||||
return true
|
||||
end
|
||||
super
|
||||
end
|
||||
|
||||
def sync
|
||||
self.set_selinux_context(@resource[:path], @should, name)
|
||||
return :file_changed
|
||||
|
|
|
@ -74,6 +74,12 @@ Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f
|
|||
@sel.sync
|
||||
end
|
||||
|
||||
it "should do nothing for insync? if no SELinux support" do
|
||||
@sel.should = %{newcontext}
|
||||
@sel.expects(:selinux_support?).returns false
|
||||
@sel.insync?("oldcontext").should == true
|
||||
end
|
||||
|
||||
after do
|
||||
Puppet::Type.type(:file).clear
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче