summaryrefslogtreecommitdiff
path: root/lib/chef/resource/file.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@opscode.com>2013-07-02 15:44:57 -0700
committerdanielsdeleo <dan@opscode.com>2013-07-02 19:04:02 -0700
commitc2407b4187f16747979956b90a6dc98f3997b01c (patch)
treee8c17f1147683eac995291486400f8accdb1dcd1 /lib/chef/resource/file.rb
parenta3565d9d674c777d9988bcbaa778862a02da5466 (diff)
downloadchef-c2407b4187f16747979956b90a6dc98f3997b01c.tar.gz
Use symlink source when inspecting current permissions
Fixes CHEF-4341 http://tickets.opscode.com/browse/CHEF-4341 When manage_symlink_source is enabled, File providers update current_resource with the security attributes of the source file. Subsequent actions (e.g., running FileAccessControl) use the values set on current_resource to determine if they need to modify the system, so setting them incorrect leads to a file resource being (not) updated incorrectly.
Diffstat (limited to 'lib/chef/resource/file.rb')
-rw-r--r--lib/chef/resource/file.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/resource/file.rb b/lib/chef/resource/file.rb
index 15adb9dae8..676cbf200a 100644
--- a/lib/chef/resource/file.rb
+++ b/lib/chef/resource/file.rb
@@ -36,6 +36,8 @@ class Chef
state_attrs :checksum, :owner, :group, :mode
end
+ attr_writer :checksum
+
provides :file, :on_platforms => :all
def initialize(name, run_context=nil)