diff options
author | nimisha <nimisha.sharad@msystechnologies.com> | 2017-12-19 18:55:55 +0530 |
---|---|---|
committer | nimisha <nimisha.sharad@msystechnologies.com> | 2018-01-24 15:00:39 +0530 |
commit | 85e0c15d15425978de490bdce7fa7692690e6dc4 (patch) | |
tree | 46f0791f15673bd157bd9cba3d628f40e2e183b7 /lib/chef | |
parent | cc9766bd0a98b733eef3e9d40f3eac85a25f7e93 (diff) | |
download | chef-85e0c15d15425978de490bdce7fa7692690e6dc4.tar.gz |
Fixed/added specs for LogonSession changes
Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/util/windows/logon_session.rb | 2 | ||||
-rw-r--r-- | lib/chef/win32/security.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/util/windows/logon_session.rb b/lib/chef/util/windows/logon_session.rb index 5a126f0c4a..20c49cfd27 100644 --- a/lib/chef/util/windows/logon_session.rb +++ b/lib/chef/util/windows/logon_session.rb @@ -25,7 +25,7 @@ class Chef class LogonSession include Chef::Mixin::WideString - def initialize(username, password, domain = nil, logon_type) + def initialize(username, password, domain = nil, logon_type = :remote) if username.nil? || password.nil? raise ArgumentError, "The logon session must be initialize with non-nil user name and password parameters" end diff --git a/lib/chef/win32/security.rb b/lib/chef/win32/security.rb index 2cb19ad520..c658c8f70f 100644 --- a/lib/chef/win32/security.rb +++ b/lib/chef/win32/security.rb @@ -652,7 +652,7 @@ class Chef begin process_token = open_current_process_token(TOKEN_READ) rescue Exception => run_error - return false if run_error.message.match(/Access is denied/) + return false if run_error.message =~ /Access is denied/ Chef::ReservedNames::Win32::Error.raise! end |