diff options
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 |