summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-05-28 17:03:19 -0700
committerTim Smith <tsmith84@gmail.com>2020-05-28 17:03:19 -0700
commit7afa33ff840c252b4c540770e9de1920e5e20d3e (patch)
tree697d145a1b7ef02b3bf60d3a144e89db6a82b22f
parente886a813d2ade9c3615354c4234b279145a13c02 (diff)
downloadchef-7afa33ff840c252b4c540770e9de1920e5e20d3e.tar.gz
Make sure file is properly scoped in cron_access
This was hitting the file resource not the file ruby class. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/cron_access.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/resource/cron_access.rb b/lib/chef/resource/cron_access.rb
index ffb141ebd3..59b510a65f 100644
--- a/lib/chef/resource/cron_access.rb
+++ b/lib/chef/resource/cron_access.rb
@@ -66,7 +66,7 @@ class Chef
action :allow do
description "Add the user to the cron.allow file."
- allow_path = File.join(value_for_platform_family(CRON_PATHS), "cron.allow")
+ allow_path = ::File.join(value_for_platform_family(CRON_PATHS), "cron.allow")
with_run_context :root do
edit_resource(:template, allow_path) do |new_resource|
@@ -83,7 +83,7 @@ class Chef
action :deny do
description "Add the user to the cron.deny file."
- deny_path = File.join(value_for_platform_family(CRON_PATHS), "cron.deny")
+ deny_path = ::File.join(value_for_platform_family(CRON_PATHS), "cron.deny")
with_run_context :root do
edit_resource(:template, deny_path) do |new_resource|