diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-02-28 14:28:47 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-02-28 15:01:03 -0800 |
commit | 24ba928939eee5dbcc6267dde60e664c8c44087d (patch) | |
tree | 0174069277b28a58b1fa973de1638a05128e3a61 /chef-config | |
parent | a60b4aec184b97986dde9ed577b9558d10fea951 (diff) | |
download | chef-24ba928939eee5dbcc6267dde60e664c8c44087d.tar.gz |
directory resource: Remove support for macOS < 10.11
There's no reason to test this behavior anymore since we don't support macOS < 10.13
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'chef-config')
-rw-r--r-- | chef-config/lib/chef-config/path_helper.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chef-config/lib/chef-config/path_helper.rb b/chef-config/lib/chef-config/path_helper.rb index 9ffdd0be56..23b70f30b3 100644 --- a/chef-config/lib/chef-config/path_helper.rb +++ b/chef-config/lib/chef-config/path_helper.rb @@ -1,6 +1,6 @@ # # Author:: Bryan McLellan <btm@loftninjas.org> -# Copyright:: Copyright 2014-2019, Chef Software Inc. +# Copyright:: Copyright 2014-2020, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -265,15 +265,15 @@ module ChefConfig end end - # Determine if the given path is protected by OS X System Integrity Protection. + # Determine if the given path is protected by macOS System Integrity Protection. def self.is_sip_path?(path, node) - if node["platform"] == "mac_os_x" && Gem::Version.new(node["platform_version"]) >= Gem::Version.new("10.11") + if ChefUtils.macos? # @todo: parse rootless.conf for this? sip_paths = [ "/System", "/bin", "/sbin", "/usr" ] sip_paths.each do |sip_path| - ChefConfig.logger.info("This is a SIP path, checking if it in exceptions list.") + ChefConfig.logger.info("#{sip_path} is a SIP path, checking if it is in the exceptions list.") return true if path.start_with?(sip_path) end false @@ -293,7 +293,7 @@ module ChefConfig sip_exceptions.each do |exception_path| return true if path.start_with?(exception_path) end - ChefConfig.logger.error("Cannot write to a SIP Path on OS X 10.11+") + ChefConfig.logger.error("Cannot write to a SIP path #{path} on macOS!") false end |