[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, master, updated. debian/0.24.6-1-356-g5718585

James Turnbull james at lovedthanlost.net
Fri Jan 23 14:21:13 UTC 2009


The following commit has been merged in the master branch:
commit 250239eb7fa93dbacd2e755307a6c115615fe87b
Author: Sean E. Millichamp <sean at bruenor.org>
Date:   Tue Sep 30 14:38:21 2008 -0400

    Add new support for :selrange SELinux file property

diff --git a/lib/puppet/type/file/selcontext.rb b/lib/puppet/type/file/selcontext.rb
index a344f20..b2c89e6 100644
--- a/lib/puppet/type/file/selcontext.rb
+++ b/lib/puppet/type/file/selcontext.rb
@@ -76,5 +76,12 @@ module Puppet
         defaultto { self.retrieve_default_context(:seltype) }
     end
 
+    Puppet.type(:file).newproperty(:selrange, :parent => Puppet::SELFileContext) do
+        desc "What the SELinux Range context of the file should be."
+
+        @event = :file_changed
+        defaultto { self.retrieve_default_context(:selrange) }
+    end
+
 end
 
diff --git a/spec/unit/other/selinux.rb b/spec/unit/other/selinux.rb
index 465fc4e..26cd840 100644
--- a/spec/unit/other/selinux.rb
+++ b/spec/unit/other/selinux.rb
@@ -12,7 +12,8 @@ describe Puppet.type(:file), " when manipulating file contexts" do
 			:ensure => "file",
 			:seluser => "user_u",
 			:selrole => "role_r",
-			:seltype => "type_t" )
+			:seltype => "type_t",
+			:selrange => "s0" )
 	end
 	it "should use :seluser to get/set an SELinux user file context attribute" do
 		@file.property(:seluser).should == "user_u"
@@ -23,6 +24,9 @@ describe Puppet.type(:file), " when manipulating file contexts" do
 	it "should use :seltype to get/set an SELinux user file context attribute" do
 		@file.property(:seltype).should == "type_t"
 	end
+	it "should use :selrange to get/set an SELinux range file context attribute" do
+		@file.property(:seltype).should == "s0"
+	end
 	after :each do
 		Puppet::Type::File.clear()
 	end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list