diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2020-07-23 21:20:14 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2020-07-23 21:20:14 -0700 |
commit | 920c1f60e0e441bf3830048693333e796c863879 (patch) | |
tree | eeff9347e4c24faa00135680cac703baa1e7107f | |
parent | ca77e0deb566570f2bd4e24bb4fe037a21123480 (diff) | |
download | chef-920c1f60e0e441bf3830048693333e796c863879.tar.gz |
Fix default_paths patch
Fixing a few things that may have broken selinux on EL6 through 'which'
support.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | lib/chef/mixin/default_paths.rb | 10 | ||||
-rw-r--r-- | lib/chef/mixin/which.rb | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/mixin/default_paths.rb b/lib/chef/mixin/default_paths.rb index 836911270a..95f444c13f 100644 --- a/lib/chef/mixin/default_paths.rb +++ b/lib/chef/mixin/default_paths.rb @@ -15,16 +15,16 @@ # limitations under the License. # +require "chef-utils/dsl/default_paths" unless defined?(ChefUtils::DSL::DefaultPaths) + class Chef module Mixin module DefaultPaths - def enforce_path_sanity(env = ENV) - enforce_default_paths(env) - end + include ChefUtils::DSL::DefaultPaths def enforce_default_paths(env = ENV) - if Chef::Config[:enforce_default_paths] - env["PATH"] = ChefUtils::DSL::DefaultPaths.default_paths(env) + if Chef::Config[:enforce_default_paths] || Chef::Config[:enforce_path_sanity] + env["PATH"] = default_paths(env) end end end diff --git a/lib/chef/mixin/which.rb b/lib/chef/mixin/which.rb index a5975f958a..1e58c8bc3a 100644 --- a/lib/chef/mixin/which.rb +++ b/lib/chef/mixin/which.rb @@ -28,7 +28,7 @@ class Chef private - # we dep-inject path sanity into this API for historical reasons + # we dep-inject default paths into this API for historical reasons # # @api private def __extra_paths |