[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:20 UTC 2009


The following commit has been merged in the master branch:
commit 996ac469b3013e4bcda8bc2f3bcb49ef57740a1f
Author: Sean E. Millichamp <sean at bruenor.org>
Date:   Tue Oct 7 22:46:02 2008 -0400

    Fix scenario when SELinux support tools exist, but SELinux is disabled

diff --git a/lib/puppet/util/selinux.rb b/lib/puppet/util/selinux.rb
index c257733..e99ee30 100644
--- a/lib/puppet/util/selinux.rb
+++ b/lib/puppet/util/selinux.rb
@@ -34,6 +34,9 @@ module Puppet::Util::SELinux
     # Note: For this command to work a full, non-relative, filesystem path
     # should be given.
     def get_selinux_default_context(file)
+        unless selinux_support?
+            return nil
+        end
         unless FileTest.executable?("/usr/sbin/matchpathcon")
             return nil
         end
@@ -73,6 +76,9 @@ module Puppet::Util::SELinux
     # only a single component or update the entire context.  It is just a
     # wrapper around the chcon command.
     def set_selinux_context(file, value, component = false)
+        unless selinux_support?
+            return nil
+        end
         case component
             when :seluser
                 flag = "-u"

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list