summaryrefslogtreecommitdiff
path: root/lib/chef/win32/api
diff options
context:
space:
mode:
authorMatt Wrock <matt@mattwrock.com>2016-02-03 09:58:18 -0800
committerMatt Wrock <matt@mattwrock.com>2016-02-03 09:58:18 -0800
commitb74d0028914b03bce785b940f0cad5390444ae3a (patch)
treebf1e75773bae697cd469f5e560440e2fd0b5e1c5 /lib/chef/win32/api
parentab63cd4be967b5d01f6ec856244e4b9af4e896d9 (diff)
downloadchef-invalid.tar.gz
fixes #4515 and use FormatMessage to get correct error messages from native API instead of retyping them with our fingersinvalid
Diffstat (limited to 'lib/chef/win32/api')
-rw-r--r--lib/chef/win32/api/error.rb1
-rw-r--r--lib/chef/win32/api/net.rb10
2 files changed, 1 insertions, 10 deletions
diff --git a/lib/chef/win32/api/error.rb b/lib/chef/win32/api/error.rb
index ecc1625353..0b10fc6e3d 100644
--- a/lib/chef/win32/api/error.rb
+++ b/lib/chef/win32/api/error.rb
@@ -848,6 +848,7 @@ class Chef
ERROR_INVALID_COLORINDEX = 2022
ERROR_CONNECTED_OTHER_PASSWORD = 2108
ERROR_BAD_USERNAME = 2202
+ ERROR_USER_NOT_FOUND = 2221
ERROR_NOT_CONNECTED = 2250
ERROR_OPEN_FILES = 2401
ERROR_ACTIVE_CONNECTIONS = 2402
diff --git a/lib/chef/win32/api/net.rb b/lib/chef/win32/api/net.rb
index 848499b403..fdbe55579f 100644
--- a/lib/chef/win32/api/net.rb
+++ b/lib/chef/win32/api/net.rb
@@ -46,16 +46,6 @@ class Chef
USE_LOTS_OF_FORCE = 2 #every windows API should support this flag
NERR_Success = 0
- NERR_InvalidComputer = 2351
- NERR_NotPrimary = 2226
- NERR_SpeGroupOp = 2234
- NERR_LastAdmin = 2452
- NERR_BadUsername = 2202
- NERR_BadPassword = 2203
- NERR_PasswordTooShort = 2245
- NERR_UserNotFound = 2221
- NERR_GroupNotFound = 2220
- ERROR_ACCESS_DENIED = 5
ERROR_MORE_DATA = 234
ffi_lib "netapi32"