diff options
author | Ryan Cragun <me@ryan.ec> | 2014-11-06 15:47:36 -0800 |
---|---|---|
committer | Serdar Sutay <serdar@opscode.com> | 2014-11-07 17:22:32 -0800 |
commit | ccf7974905b6f6dce1e626f2894970813177445f (patch) | |
tree | a45d01acf9e0fb11dafbf6523019e785e2c48932 /lib/chef/api_client | |
parent | 347b1d56a2784fc704e77dec2f1574ba61083f40 (diff) | |
download | chef-ccf7974905b6f6dce1e626f2894970813177445f.tar.gz |
Make client.pem being a symlink a configurable option
Diffstat (limited to 'lib/chef/api_client')
-rw-r--r-- | lib/chef/api_client/registration.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/api_client/registration.rb b/lib/chef/api_client/registration.rb index 213d0b7f49..8a5885eff3 100644 --- a/lib/chef/api_client/registration.rb +++ b/lib/chef/api_client/registration.rb @@ -153,7 +153,9 @@ class Chef def file_flags base_flags = File::CREAT|File::TRUNC|File::RDWR # Windows doesn't have symlinks, so it doesn't have NOFOLLOW - base_flags |= File::NOFOLLOW if defined?(File::NOFOLLOW) + if defined?(File::NOFOLLOW) && !Chef::Config[:follow_client_key_symlink] + base_flags |= File::NOFOLLOW + end base_flags end end |