summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authornimisha <nimisha.sharad@msystechnologies.com>2017-08-17 18:41:31 +0530
committerBryan McLellan <btm@loftninjas.org>2017-09-05 20:09:30 -0400
commit1ee8b15ae338cc5eadb278f949c2e2eaca5daea0 (patch)
tree4eab9706f19abef14bb445c3b5bcf390b33f6609 /lib/chef
parent3efe94760ff2d3743431a88331256bface534847 (diff)
downloadchef-1ee8b15ae338cc5eadb278f949c2e2eaca5daea0.tar.gz
Using LOGON32_LOGON_NEW_CREDENTIALS instead of LOGON32_LOGON_NETWORK
Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/resource/remote_file.rb8
-rw-r--r--lib/chef/util/windows/logon_session.rb2
2 files changed, 1 insertions, 9 deletions
diff --git a/lib/chef/resource/remote_file.rb b/lib/chef/resource/remote_file.rb
index bd0cf03360..25586af702 100644
--- a/lib/chef/resource/remote_file.rb
+++ b/lib/chef/resource/remote_file.rb
@@ -137,14 +137,6 @@ class Chef
property :remote_password, String, sensitive: true
- def sensitive(args = nil)
- if remote_password
- true
- else
- super
- end
- end
-
def after_created
validate_identity_platform(remote_user, remote_password, remote_domain)
identity = qualify_user(remote_user, remote_password, remote_domain)
diff --git a/lib/chef/util/windows/logon_session.rb b/lib/chef/util/windows/logon_session.rb
index adabdbb3ef..ef80b113b1 100644
--- a/lib/chef/util/windows/logon_session.rb
+++ b/lib/chef/util/windows/logon_session.rb
@@ -47,7 +47,7 @@ class Chef
password = wstring(original_password)
domain = wstring(original_domain)
- status = Chef::ReservedNames::Win32::API::Security.LogonUserW(username, domain, password, Chef::ReservedNames::Win32::API::Security::LOGON32_LOGON_NETWORK, Chef::ReservedNames::Win32::API::Security::LOGON32_PROVIDER_DEFAULT, token)
+ status = Chef::ReservedNames::Win32::API::Security.LogonUserW(username, domain, password, Chef::ReservedNames::Win32::API::Security::LOGON32_LOGON_NEW_CREDENTIALS, Chef::ReservedNames::Win32::API::Security::LOGON32_PROVIDER_DEFAULT, token)
if !status
last_error = FFI::LastError.error