Update the NT_STATUS -> DOS error table.
authorAndrew Bartlett <abartlet@samba.org>
Thu, 3 Jan 2002 08:36:47 +0000 (08:36 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 3 Jan 2002 08:36:47 +0000 (08:36 +0000)
This new table is rather different to the old one (see diff posted to the
list for a sorted list of differences) and needs a *lot* of testing.

It does however seem to line up much better with what NT is using, as
exampled by the change to the OBJECT_NAME_COLLISION DOS error, it now matches
win2k where it didn't before.

I can't see any critical errors we now get wrong, and I know that the auth
errors are correct as per my on-the-wire observations.

This table was produced (and I hope to comment this better later) by
using the ERRMAPEXTRACT smbtorture tool, a Win2k domain member and the
'name_to_ntstatus' auth module on the HEAD PDC.  This module returned
the username as the error, and the NT box was forced to give me a dos
error becouse thats all I negotiated on that connection.  Hence the map.

Andrew Bartlett
(This used to be commit a855dfb2e0b899d03087860e5462c2aed3ca4cad)

source3/include/doserr.h
source3/libsmb/errormap.c
source3/libsmb/smberr.c
source3/torture/torture.c

index d55f21be3467c6dd600d52cf4dbe4dfe809cd4b6..52212dc741bef4470a81e2a3b35c8f06d304bdef 100644 (file)
@@ -54,6 +54,7 @@
 #define ERRbadshare 32 /* Share mode on file conflict with open mode */
 #define ERRlock 33 /* Lock request conflicts with existing lock */
 #define ERRunsup 50 /* Request unsupported, returned by Win 95, RJS 20Jun98 */
+#define ERRnetnamedel 64 /* Network name deleted or not available */
 #define ERRnosuchshare 67 /* You specified an invalid share name */
 #define ERRfilexists 80 /* File in operation already exists */
 #define ERRinvalidparam 87
@@ -75,6 +76,7 @@
 #define ERRbuftoosmall 2123
 #define ERRunknownipc 2142
 #define ERRnosuchprintjob 2151
+#define ERRinvgroup 2455
 
 /* here's a special one from observing NT */
 #define ERRnoipc 66 /* don't support ipc */
index cf3dc34618ce595a155f97ae459ea40d81e94531..74711e01bf98b51480df116ae1da201d17aec84b 100644 (file)
@@ -27,186 +27,217 @@ static struct {
        uint32 dos_code;
        NTSTATUS ntstatus;
 } ntstatus_to_dos_map[] = {
-       {ERRDOS,        997,    NT_STATUS(0x00000103)},
-       {ERRDOS,        111,    STATUS_MORE_ENTRIES},
-       {ERRDOS,        1300,   NT_STATUS(0x00000106)},
-       {ERRDOS,        1301,   NT_STATUS(0x00000107)},
-       {ERRDOS,        1022,   NT_STATUS(0x0000010c)},
-       {ERRDOS,        1302,   NT_STATUS(0x0000010d)},
-       {ERRDOS,        8201,   NT_STATUS(0x00000121)},
        {ERRDOS,        31,     NT_STATUS_UNSUCCESSFUL},
-       {ERRSRV,        ERRsmbcmd,      NT_STATUS_NOT_IMPLEMENTED},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_INFO_CLASS},
+       {ERRDOS,        ERRbadfunc,     NT_STATUS_NOT_IMPLEMENTED},
+       {ERRDOS,        87,     NT_STATUS_INVALID_INFO_CLASS},
        {ERRDOS,        24,     NT_STATUS_INFO_LENGTH_MISMATCH},
-       {ERRDOS,        998,    NT_STATUS_ACCESS_VIOLATION},
-       {ERRDOS,        999,    NT_STATUS_IN_PAGE_ERROR},
-       {ERRDOS,        1454,   NT_STATUS_PAGEFILE_QUOTA},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ACCESS_VIOLATION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_IN_PAGE_ERROR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PAGEFILE_QUOTA},
        {ERRDOS,        ERRbadfid,      NT_STATUS_INVALID_HANDLE},
-       {ERRDOS,        1001,   NT_STATUS_BAD_INITIAL_STACK},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_BAD_INITIAL_STACK},
        {ERRDOS,        193,    NT_STATUS_BAD_INITIAL_PC},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_CID},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_PARAMETER},
+       {ERRDOS,        87,     NT_STATUS_INVALID_CID},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_TIMER_NOT_CANCELED},
+       {ERRDOS,        87,     NT_STATUS_INVALID_PARAMETER},
        {ERRDOS,        ERRbadfile,     NT_STATUS_NO_SUCH_DEVICE},
        {ERRDOS,        ERRbadfile,     NT_STATUS_NO_SUCH_FILE},
-       {ERRSRV,        ERRsmbcmd,      NT_STATUS_INVALID_DEVICE_REQUEST},
+       {ERRDOS,        ERRbadfunc,     NT_STATUS_INVALID_DEVICE_REQUEST},
        {ERRDOS,        38,     NT_STATUS_END_OF_FILE},
        {ERRDOS,        34,     NT_STATUS_WRONG_VOLUME},
        {ERRDOS,        21,     NT_STATUS_NO_MEDIA_IN_DEVICE},
-       {ERRDOS,        1785,   NT_STATUS_UNRECOGNIZED_MEDIA},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_UNRECOGNIZED_MEDIA},
        {ERRDOS,        27,     NT_STATUS_NONEXISTENT_SECTOR},
-       {ERRDOS,        111,    NT_STATUS_MORE_PROCESSING_REQUIRED},
+/** Session setup succeeded.  This shouldn't happen...*/
+/** Session setup succeeded.  This shouldn't happen...*/
+/** NT error on DOS connection! (NT_STATUS_OK) */
+/*     { This NT error code was 'sqashed'
+        from NT_STATUS_MORE_PROCESSING_REQUIRED to NT_STATUS_OK 
+        during the session setup }
+*/
+#if 0
+       {SUCCESS,       0,      NT_STATUS_OK},
+#endif
        {ERRDOS,        ERRnomem,       NT_STATUS_NO_MEMORY},
        {ERRDOS,        487,    NT_STATUS_CONFLICTING_ADDRESSES},
        {ERRDOS,        487,    NT_STATUS_NOT_MAPPED_VIEW},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS(0xc000001a)},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_UNABLE_TO_DELETE_SECTION},
-       {ERRSRV,        ERRsmbcmd,      NT_STATUS_INVALID_SYSTEM_SERVICE},
-       {ERRDOS,        29,     NT_STATUS_ILLEGAL_INSTRUCTION},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS_INVALID_LOCK_SEQUENCE},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS_INVALID_VIEW_SIZE},
+       {ERRDOS,        87,     NT_STATUS_UNABLE_TO_FREE_VM},
+       {ERRDOS,        87,     NT_STATUS_UNABLE_TO_DELETE_SECTION},
+       {ERRDOS,        2142,   NT_STATUS_INVALID_SYSTEM_SERVICE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ILLEGAL_INSTRUCTION},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_INVALID_LOCK_SEQUENCE},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_INVALID_VIEW_SIZE},
        {ERRDOS,        193,    NT_STATUS_INVALID_FILE_FOR_SECTION},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS_ALREADY_COMMITTED},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS_ACCESS_DENIED},
-       {ERRDOS,        ERRinsufficientbuffer,  NT_STATUS_BUFFER_TOO_SMALL},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_ALREADY_COMMITTED},
+/*     { This NT error code was 'sqashed'
+        from NT_STATUS_ACCESS_DENIED to NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE 
+        during the session setup }
+*/
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_ACCESS_DENIED},
+       {ERRDOS,        111,    NT_STATUS_BUFFER_TOO_SMALL},
        {ERRDOS,        ERRbadfid,      NT_STATUS_OBJECT_TYPE_MISMATCH},
-       {ERRDOS,        37,     NT_STATUS_NONCONTINUABLE_EXCEPTION},
-       {ERRDOS,        38,     NT_STATUS_INVALID_DISPOSITION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NONCONTINUABLE_EXCEPTION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_DISPOSITION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_UNWIND},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_BAD_STACK},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_UNWIND_TARGET},
        {ERRDOS,        158,    NT_STATUS_NOT_LOCKED},
-       {ERRDOS,        43,     NT_STATUS_PARITY_ERROR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PARITY_ERROR},
        {ERRDOS,        487,    NT_STATUS_UNABLE_TO_DECOMMIT_VM},
        {ERRDOS,        487,    NT_STATUS_NOT_COMMITTED},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_PARAMETER_MIX},
-       {ERRDOS,        26,     NT_STATUS_DISK_CORRUPT_ERROR},
-       {ERRSRV,        206,    NT_STATUS_OBJECT_NAME_INVALID},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_PORT_ATTRIBUTES},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PORT_MESSAGE_TOO_LONG},
+       {ERRDOS,        87,     NT_STATUS_INVALID_PARAMETER_MIX},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_QUOTA_LOWER},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DISK_CORRUPT_ERROR},
+       {ERRDOS,        ERRinvalidname, NT_STATUS_OBJECT_NAME_INVALID},
        {ERRDOS,        ERRbadfile,     NT_STATUS_OBJECT_NAME_NOT_FOUND},
-       {ERRDOS,        ERRfilexists,   NT_STATUS_OBJECT_NAME_COLLISION},
+       {ERRDOS,        183,    NT_STATUS_OBJECT_NAME_COLLISION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_HANDLE_NOT_WAITABLE},
        {ERRDOS,        ERRbadfid,      NT_STATUS_PORT_DISCONNECTED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DEVICE_ALREADY_ATTACHED},
        {ERRDOS,        161,    NT_STATUS_OBJECT_PATH_INVALID},
        {ERRDOS,        ERRbadpath,     NT_STATUS_OBJECT_PATH_NOT_FOUND},
        {ERRDOS,        161,    NT_STATUS_OBJECT_PATH_SYNTAX_BAD},
-       {ERRDOS,        1117,   NT_STATUS_DATA_OVERRUN},
-       {ERRDOS,        1117,   NT_STATUS_DATA_LATE_ERROR},
-       {ERRDOS,        ERRbaddata,     NT_STATUS_DATA_ERROR},
-       {ERRDOS,        ERRbaddata,     NT_STATUS_CRC_ERROR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DATA_OVERRUN},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DATA_LATE_ERROR},
+       {ERRDOS,        23,     NT_STATUS_DATA_ERROR},
+       {ERRDOS,        23,     NT_STATUS_CRC_ERROR},
        {ERRDOS,        ERRnomem,       NT_STATUS_SECTION_TOO_BIG},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS_PORT_CONNECTION_REFUSED},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_PORT_CONNECTION_REFUSED},
        {ERRDOS,        ERRbadfid,      NT_STATUS_INVALID_PORT_HANDLE},
        {ERRDOS,        ERRbadshare,    NT_STATUS_SHARING_VIOLATION},
-       {ERRDOS,        1816,   NT_STATUS_QUOTA_EXCEEDED},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_PAGE_PROTECTION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_QUOTA_EXCEEDED},
+       {ERRDOS,        87,     NT_STATUS_INVALID_PAGE_PROTECTION},
        {ERRDOS,        288,    NT_STATUS_MUTANT_NOT_OWNED},
        {ERRDOS,        298,    NT_STATUS_SEMAPHORE_LIMIT_EXCEEDED},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_PORT_ALREADY_SET},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_SECTION_NOT_IMAGE},
+       {ERRDOS,        87,     NT_STATUS_PORT_ALREADY_SET},
+       {ERRDOS,        87,     NT_STATUS_SECTION_NOT_IMAGE},
        {ERRDOS,        156,    NT_STATUS_SUSPEND_COUNT_EXCEEDED},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS_THREAD_IS_TERMINATING},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_BAD_WORKING_SET_LIMIT},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INCOMPATIBLE_FILE_MAP},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_SECTION_PROTECTION},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_THREAD_IS_TERMINATING},
+       {ERRDOS,        87,     NT_STATUS_BAD_WORKING_SET_LIMIT},
+       {ERRDOS,        87,     NT_STATUS_INCOMPATIBLE_FILE_MAP},
+       {ERRDOS,        87,     NT_STATUS_SECTION_PROTECTION},
        {ERRDOS,        282,    NT_STATUS_EAS_NOT_SUPPORTED},
-       {ERRDOS,        275,    NT_STATUS_EA_TOO_LARGE},
-       {ERRDOS,        276,    NT_STATUS_NONEXISTENT_EA_ENTRY},
-       {ERRDOS,        276,    NT_STATUS_NO_EAS_ON_FILE},
-       {ERRDOS,        276,    NT_STATUS_EA_CORRUPT_ERROR},
+       {ERRDOS,        255,    NT_STATUS_EA_TOO_LARGE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NONEXISTENT_EA_ENTRY},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_EAS_ON_FILE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_EA_CORRUPT_ERROR},
        {ERRDOS,        ERRlock,        NT_STATUS_FILE_LOCK_CONFLICT},
        {ERRDOS,        ERRlock,        NT_STATUS_LOCK_NOT_GRANTED},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS_DELETE_PENDING},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_DELETE_PENDING},
        {ERRDOS,        ERRunsup,       NT_STATUS_CTL_FILE_NOT_SUPPORTED},
-       {ERRDOS,        1305,   NT_STATUS_UNKNOWN_REVISION},
-       {ERRDOS,        1306,   NT_STATUS_REVISION_MISMATCH},
-       {ERRDOS,        1307,   NT_STATUS_INVALID_OWNER},
-       {ERRDOS,        1308,   NT_STATUS_INVALID_PRIMARY_GROUP},
-       {ERRDOS,        1309,   NT_STATUS_NO_IMPERSONATION_TOKEN},
-       {ERRDOS,        1310,   NT_STATUS_CANT_DISABLE_MANDATORY},
-       {ERRDOS,        1311,   NT_STATUS_NO_LOGON_SERVERS},
-       {ERRDOS,        1312,   NT_STATUS_NO_SUCH_LOGON_SESSION},
-       {ERRDOS,        1313,   NT_STATUS_NO_SUCH_PRIVILEGE},
-       {ERRDOS,        1314,   NT_STATUS_PRIVILEGE_NOT_HELD},
-       {ERRDOS,        1315,   NT_STATUS_INVALID_ACCOUNT_NAME},
-       {ERRDOS,        1316,   NT_STATUS_USER_EXISTS},
-       {ERRDOS,        1317,   NT_STATUS_NO_SUCH_USER},
-       {ERRDOS,        1318,   NT_STATUS_GROUP_EXISTS},
-       {ERRDOS,        1319,   NT_STATUS_NO_SUCH_GROUP},
-       {ERRDOS,        1320,   NT_STATUS_MEMBER_IN_GROUP},
-       {ERRDOS,        1321,   NT_STATUS_MEMBER_NOT_IN_GROUP},
-       {ERRDOS,        1322,   NT_STATUS_LAST_ADMIN},
-       {ERRSRV,        ERRbadpw,       NT_STATUS_WRONG_PASSWORD},
-       {ERRDOS,        1324,   NT_STATUS_ILL_FORMED_PASSWORD},
-       {ERRDOS,        1325,   NT_STATUS_PASSWORD_RESTRICTION},
-       {ERRDOS,        ERRlogonfailure, NT_STATUS_LOGON_FAILURE},
-       {ERRDOS,        1327,   NT_STATUS_ACCOUNT_RESTRICTION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_UNKNOWN_REVISION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_REVISION_MISMATCH},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_OWNER},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_PRIMARY_GROUP},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_IMPERSONATION_TOKEN},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_CANT_DISABLE_MANDATORY},
+       {ERRDOS,        2215,   NT_STATUS_NO_LOGON_SERVERS},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_SUCH_LOGON_SESSION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_SUCH_PRIVILEGE},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_PRIVILEGE_NOT_HELD},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_ACCOUNT_NAME},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_USER_EXISTS},
+/*     { This NT error code was 'sqashed'
+        from NT_STATUS_NO_SUCH_USER to NT_STATUS_LOGON_FAILURE 
+        during the session setup }
+*/
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_NO_SUCH_USER},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_GROUP_EXISTS},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_SUCH_GROUP},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_MEMBER_IN_GROUP},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_MEMBER_NOT_IN_GROUP},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_LAST_ADMIN},
+/*     { This NT error code was 'sqashed'
+        from NT_STATUS_WRONG_PASSWORD to NT_STATUS_LOGON_FAILURE 
+        during the session setup }
+*/
+       {ERRDOS,        ERRbadpw,       NT_STATUS_WRONG_PASSWORD},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ILL_FORMED_PASSWORD},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PASSWORD_RESTRICTION},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_LOGON_FAILURE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ACCOUNT_RESTRICTION},
        {ERRSRV,        2241,   NT_STATUS_INVALID_LOGON_HOURS},
        {ERRSRV,        2240,   NT_STATUS_INVALID_WORKSTATION},
        {ERRSRV,        2242,   NT_STATUS_PASSWORD_EXPIRED},
        {ERRSRV,        2239,   NT_STATUS_ACCOUNT_DISABLED},
-       {ERRDOS,        1332,   NT_STATUS_NONE_MAPPED},
-       {ERRDOS,        1333,   NT_STATUS_TOO_MANY_LUIDS_REQUESTED},
-       {ERRDOS,        1334,   NT_STATUS_LUIDS_EXHAUSTED},
-       {ERRDOS,        1335,   NT_STATUS_INVALID_SUB_AUTHORITY},
-       {ERRDOS,        1336,   NT_STATUS_INVALID_ACL},
-       {ERRDOS,        1337,   NT_STATUS_INVALID_SID},
-       {ERRDOS,        1338,   NT_STATUS_INVALID_SECURITY_DESCR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NONE_MAPPED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_TOO_MANY_LUIDS_REQUESTED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_LUIDS_EXHAUSTED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_SUB_AUTHORITY},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_ACL},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_SID},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_SECURITY_DESCR},
        {ERRDOS,        127,    NT_STATUS_PROCEDURE_NOT_FOUND},
        {ERRDOS,        193,    NT_STATUS_INVALID_IMAGE_FORMAT},
-       {ERRDOS,        1008,   NT_STATUS_NO_TOKEN},
-       {ERRDOS,        1340,   NT_STATUS_BAD_INHERITANCE_ACL},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_TOKEN},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_BAD_INHERITANCE_ACL},
        {ERRDOS,        158,    NT_STATUS_RANGE_NOT_LOCKED},
-       {ERRSRV,        ERRnoroom,      NT_STATUS_DISK_FULL},
-       {ERRDOS,        1341,   NT_STATUS_SERVER_DISABLED},
-       {ERRDOS,        1342,   NT_STATUS_SERVER_NOT_DISABLED},
+       {ERRDOS,        112,    NT_STATUS_DISK_FULL},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_SERVER_DISABLED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_SERVER_NOT_DISABLED},
        {ERRDOS,        68,     NT_STATUS_TOO_MANY_GUIDS_REQUESTED},
        {ERRDOS,        259,    NT_STATUS_GUIDS_EXHAUSTED},
-       {ERRDOS,        1343,   NT_STATUS_INVALID_ID_AUTHORITY},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_ID_AUTHORITY},
        {ERRDOS,        259,    NT_STATUS_AGENTS_EXHAUSTED},
        {ERRDOS,        154,    NT_STATUS_INVALID_VOLUME_LABEL},
-       {ERRDOS,        14,     NT_STATUS_SECTION_NOT_EXTENDED},
+       {ERRDOS,        ERRres, NT_STATUS_SECTION_NOT_EXTENDED},
        {ERRDOS,        487,    NT_STATUS_NOT_MAPPED_DATA},
-       {ERRDOS,        1812,   NT_STATUS_RESOURCE_DATA_NOT_FOUND},
-       {ERRDOS,        1813,   NT_STATUS_RESOURCE_TYPE_NOT_FOUND},
-       {ERRDOS,        1814,   NT_STATUS_RESOURCE_NAME_NOT_FOUND},
-       {ERRDOS,        140,    NT_STATUS_ARRAY_BOUNDS_EXCEEDED},
-       {ERRDOS,        141,    NT_STATUS_FLOAT_DENORMAL_OPERAND},
-       {ERRDOS,        142,    NT_STATUS_FLOAT_DIVIDE_BY_ZERO},
-       {ERRDOS,        143,    NT_STATUS_FLOAT_INEXACT_RESULT},
-       {ERRDOS,        144,    NT_STATUS_FLOAT_INVALID_OPERATION},
-       {ERRDOS,        145,    NT_STATUS_FLOAT_OVERFLOW},
-       {ERRDOS,        146,    NT_STATUS_FLOAT_STACK_CHECK},
-       {ERRDOS,        147,    NT_STATUS_FLOAT_UNDERFLOW},
-       {ERRDOS,        148,    NT_STATUS_INTEGER_DIVIDE_BY_ZERO},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_RESOURCE_DATA_NOT_FOUND},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_RESOURCE_TYPE_NOT_FOUND},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_RESOURCE_NAME_NOT_FOUND},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ARRAY_BOUNDS_EXCEEDED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FLOAT_DENORMAL_OPERAND},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FLOAT_DIVIDE_BY_ZERO},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FLOAT_INEXACT_RESULT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FLOAT_INVALID_OPERATION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FLOAT_OVERFLOW},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FLOAT_STACK_CHECK},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FLOAT_UNDERFLOW},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INTEGER_DIVIDE_BY_ZERO},
        {ERRDOS,        534,    NT_STATUS_INTEGER_OVERFLOW},
-       {ERRDOS,        150,    NT_STATUS_PRIVILEGED_INSTRUCTION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PRIVILEGED_INSTRUCTION},
        {ERRDOS,        ERRnomem,       NT_STATUS_TOO_MANY_PAGING_FILES},
-       {ERRDOS,        1006,   NT_STATUS_FILE_INVALID},
-       {ERRDOS,        1344,   NT_STATUS_ALLOTTED_SPACE_EXCEEDED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FILE_INVALID},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ALLOTTED_SPACE_EXCEEDED},
+/*     { This NT error code was 'sqashed'
+        from NT_STATUS_INSUFFICIENT_RESOURCES to NT_STATUS_INSUFF_SERVER_RESOURCES 
+        during the session setup }
+*/
        {ERRDOS,        ERRnomem,       NT_STATUS_INSUFFICIENT_RESOURCES},
        {ERRDOS,        ERRbadpath,     NT_STATUS_DFS_EXIT_PATH_FOUND},
-       {ERRDOS,        ERRbaddata,     NT_STATUS_DEVICE_DATA_ERROR},
-       {ERRDOS,        1167,   NT_STATUS_DEVICE_NOT_CONNECTED},
+       {ERRDOS,        23,     NT_STATUS_DEVICE_DATA_ERROR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DEVICE_NOT_CONNECTED},
        {ERRDOS,        21,     NT_STATUS_DEVICE_POWER_FAILURE},
        {ERRDOS,        487,    NT_STATUS_FREE_VM_NOT_AT_BASE},
        {ERRDOS,        487,    NT_STATUS_MEMORY_NOT_ALLOCATED},
-       {ERRDOS,        1453,   NT_STATUS_WORKING_SET_QUOTA},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_WORKING_SET_QUOTA},
        {ERRDOS,        19,     NT_STATUS_MEDIA_WRITE_PROTECTED},
        {ERRDOS,        21,     NT_STATUS_DEVICE_NOT_READY},
-       {ERRDOS,        1345,   NT_STATUS_INVALID_GROUP_ATTRIBUTES},
-       {ERRDOS,        1346,   NT_STATUS_BAD_IMPERSONATION_LEVEL},
-       {ERRDOS,        1347,   NT_STATUS_CANT_OPEN_ANONYMOUS},
-       {ERRDOS,        1348,   NT_STATUS_BAD_VALIDATION_CLASS},
-       {ERRDOS,        1349,   NT_STATUS_BAD_TOKEN_TYPE},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_BAD_MASTER_BOOT_RECORD},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_GROUP_ATTRIBUTES},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_BAD_IMPERSONATION_LEVEL},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_CANT_OPEN_ANONYMOUS},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_BAD_VALIDATION_CLASS},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_BAD_TOKEN_TYPE},
+       {ERRDOS,        87,     NT_STATUS_BAD_MASTER_BOOT_RECORD},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INSTRUCTION_MISALIGNMENT},
        {ERRDOS,        ERRpipebusy,    NT_STATUS_INSTANCE_NOT_AVAILABLE},
        {ERRDOS,        ERRpipebusy,    NT_STATUS_PIPE_NOT_AVAILABLE},
        {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_PIPE_STATE},
        {ERRDOS,        ERRpipebusy,    NT_STATUS_PIPE_BUSY},
-       {ERRSRV,        ERRsmbcmd,      NT_STATUS_ILLEGAL_FUNCTION},
+       {ERRDOS,        ERRbadfunc,     NT_STATUS_ILLEGAL_FUNCTION},
        {ERRDOS,        ERRnotconnected,        NT_STATUS_PIPE_DISCONNECTED},
        {ERRDOS,        ERRpipeclosing, NT_STATUS_PIPE_CLOSING},
-       {ERRDOS,        535,    NT_STATUS_PIPE_CONNECTED},
-       {ERRDOS,        536,    NT_STATUS_PIPE_LISTENING},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PIPE_CONNECTED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PIPE_LISTENING},
        {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_READ_MODE},
        {ERRDOS,        121,    NT_STATUS_IO_TIMEOUT},
        {ERRDOS,        38,     NT_STATUS_FILE_FORCED_CLOSED},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS_FILE_IS_A_DIRECTORY},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PROFILING_NOT_STARTED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PROFILING_NOT_STOPPED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_COULD_NOT_INTERPRET},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_FILE_IS_A_DIRECTORY},
        {ERRDOS,        ERRunsup,       NT_STATUS_NOT_SUPPORTED},
        {ERRDOS,        51,     NT_STATUS_REMOTE_NOT_LISTENING},
        {ERRDOS,        52,     NT_STATUS_DUPLICATE_NAME},
@@ -218,183 +249,241 @@ static struct {
        {ERRDOS,        58,     NT_STATUS_INVALID_NETWORK_RESPONSE},
        {ERRDOS,        59,     NT_STATUS_UNEXPECTED_NETWORK_ERROR},
        {ERRDOS,        60,     NT_STATUS_BAD_REMOTE_ADAPTER},
-       {ERRSRV,        ERRqfull,       NT_STATUS_PRINT_QUEUE_FULL},
-       {ERRSRV,        ERRqtoobig,     NT_STATUS_NO_SPOOL_SPACE},
-       {ERRSRV,        ERRinvpfid,     NT_STATUS_PRINT_CANCELLED},
-       {ERRSRV,        ERRinvnid,      NT_STATUS_NETWORK_NAME_DELETED},
-       {ERRSRV,        ERRaccess,      NT_STATUS_NETWORK_ACCESS_DENIED},
-       {ERRSRV,        ERRbadtype,     NT_STATUS_BAD_DEVICE_TYPE},
-       {ERRSRV,        ERRinvnetname,  NT_STATUS_BAD_NETWORK_NAME},
+       {ERRDOS,        61,     NT_STATUS_PRINT_QUEUE_FULL},
+       {ERRDOS,        62,     NT_STATUS_NO_SPOOL_SPACE},
+       {ERRDOS,        63,     NT_STATUS_PRINT_CANCELLED},
+       {ERRDOS,        64,     NT_STATUS_NETWORK_NAME_DELETED},
+       {ERRDOS,        65,     NT_STATUS_NETWORK_ACCESS_DENIED},
+       {ERRDOS,        66,     NT_STATUS_BAD_DEVICE_TYPE},
+       {ERRDOS,        ERRnosuchshare, NT_STATUS_BAD_NETWORK_NAME},
        {ERRDOS,        68,     NT_STATUS_TOO_MANY_NAMES},
-       {ERRSRV,        ERRtoomanyuids, NT_STATUS_TOO_MANY_SESSIONS},
-       {ERRSRV,        ERRpaused,      NT_STATUS_SHARING_PAUSED},
-       {ERRSRV,        ERRmsgoff,      NT_STATUS_REQUEST_NOT_ACCEPTED},
+       {ERRDOS,        69,     NT_STATUS_TOO_MANY_SESSIONS},
+       {ERRDOS,        70,     NT_STATUS_SHARING_PAUSED},
+       {ERRDOS,        71,     NT_STATUS_REQUEST_NOT_ACCEPTED},
        {ERRDOS,        72,     NT_STATUS_REDIRECTOR_PAUSED},
        {ERRDOS,        88,     NT_STATUS_NET_WRITE_FAULT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PROFILING_AT_LIMIT},
        {ERRDOS,        ERRdiffdevice,  NT_STATUS_NOT_SAME_DEVICE},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS_FILE_RENAMED},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_FILE_RENAMED},
        {ERRDOS,        240,    NT_STATUS_VIRTUAL_CIRCUIT_CLOSED},
-       {ERRDOS,        1350,   NT_STATUS_NO_SECURITY_ON_OBJECT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_SECURITY_ON_OBJECT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_CANT_WAIT},
        {ERRDOS,        ERRpipeclosing, NT_STATUS_PIPE_EMPTY},
-       {ERRDOS,        1351,   NT_STATUS_CANT_ACCESS_DOMAIN_INFO},
-       {ERRDOS,        1352,   NT_STATUS_INVALID_SERVER_STATE},
-       {ERRDOS,        1353,   NT_STATUS_INVALID_DOMAIN_STATE},
-       {ERRDOS,        1354,   NT_STATUS_INVALID_DOMAIN_ROLE},
-       {ERRDOS,        1355,   NT_STATUS_NO_SUCH_DOMAIN},
-       {ERRDOS,        1356,   NT_STATUS_DOMAIN_EXISTS},
-       {ERRDOS,        1357,   NT_STATUS_DOMAIN_LIMIT_EXCEEDED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_CANT_ACCESS_DOMAIN_INFO},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_CANT_TERMINATE_SELF},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_SERVER_STATE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_DOMAIN_STATE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_DOMAIN_ROLE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_SUCH_DOMAIN},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DOMAIN_EXISTS},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DOMAIN_LIMIT_EXCEEDED},
        {ERRDOS,        300,    NT_STATUS_OPLOCK_NOT_GRANTED},
        {ERRDOS,        301,    NT_STATUS_INVALID_OPLOCK_PROTOCOL},
-       {ERRDOS,        1358,   NT_STATUS_INTERNAL_DB_CORRUPTION},
-       {ERRDOS,        1359,   NT_STATUS_INTERNAL_ERROR},
-       {ERRDOS,        1360,   NT_STATUS_GENERIC_NOT_MAPPED},
-       {ERRDOS,        1361,   NT_STATUS_BAD_DESCRIPTOR_FORMAT},
-       {ERRDOS,        1784,   NT_STATUS_INVALID_USER_BUFFER},
-       {ERRDOS,        1362,   NT_STATUS_NOT_LOGON_PROCESS},
-       {ERRDOS,        1363,   NT_STATUS_LOGON_SESSION_EXISTS},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_PARAMETER_1},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_PARAMETER_2},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_PARAMETER_3},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_PARAMETER_4},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_PARAMETER_5},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_PARAMETER_6},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_PARAMETER_7},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_PARAMETER_8},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_PARAMETER_9},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_PARAMETER_10},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_PARAMETER_11},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_INVALID_PARAMETER_12},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INTERNAL_DB_CORRUPTION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INTERNAL_ERROR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_GENERIC_NOT_MAPPED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_BAD_DESCRIPTOR_FORMAT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_USER_BUFFER},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_UNEXPECTED_IO_ERROR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_UNEXPECTED_MM_CREATE_ERR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_UNEXPECTED_MM_MAP_ERROR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_UNEXPECTED_MM_EXTEND_ERR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NOT_LOGON_PROCESS},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_LOGON_SESSION_EXISTS},
+       {ERRDOS,        87,     NT_STATUS_INVALID_PARAMETER_1},
+       {ERRDOS,        87,     NT_STATUS_INVALID_PARAMETER_2},
+       {ERRDOS,        87,     NT_STATUS_INVALID_PARAMETER_3},
+       {ERRDOS,        87,     NT_STATUS_INVALID_PARAMETER_4},
+       {ERRDOS,        87,     NT_STATUS_INVALID_PARAMETER_5},
+       {ERRDOS,        87,     NT_STATUS_INVALID_PARAMETER_6},
+       {ERRDOS,        87,     NT_STATUS_INVALID_PARAMETER_7},
+       {ERRDOS,        87,     NT_STATUS_INVALID_PARAMETER_8},
+       {ERRDOS,        87,     NT_STATUS_INVALID_PARAMETER_9},
+       {ERRDOS,        87,     NT_STATUS_INVALID_PARAMETER_10},
+       {ERRDOS,        87,     NT_STATUS_INVALID_PARAMETER_11},
+       {ERRDOS,        87,     NT_STATUS_INVALID_PARAMETER_12},
        {ERRDOS,        ERRbadpath,     NT_STATUS_REDIRECTOR_NOT_STARTED},
-       {ERRDOS,        1001,   NT_STATUS_STACK_OVERFLOW},
-       {ERRDOS,        1364,   NT_STATUS_NO_SUCH_PACKAGE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_REDIRECTOR_STARTED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_STACK_OVERFLOW},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_SUCH_PACKAGE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_BAD_FUNCTION_TABLE},
        {ERRDOS,        203,    NT_STATUS(0xc0000100)},
-       {ERRDOS,        ERRremcd,       NT_STATUS_DIRECTORY_NOT_EMPTY},
-       {ERRDOS,        276,    NT_STATUS_FILE_CORRUPT_ERROR},
+       {ERRDOS,        145,    NT_STATUS_DIRECTORY_NOT_EMPTY},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FILE_CORRUPT_ERROR},
        {ERRDOS,        267,    NT_STATUS_NOT_A_DIRECTORY},
-       {ERRDOS,        1365,   NT_STATUS_BAD_LOGON_SESSION_STATE},
-       {ERRDOS,        1366,   NT_STATUS_LOGON_SESSION_COLLISION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_BAD_LOGON_SESSION_STATE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_LOGON_SESSION_COLLISION},
        {ERRDOS,        206,    NT_STATUS_NAME_TOO_LONG},
        {ERRDOS,        2401,   NT_STATUS_FILES_OPEN},
        {ERRDOS,        2404,   NT_STATUS_CONNECTION_IN_USE},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS_PROCESS_IS_TERMINATING},
-       {ERRDOS,        1367,   NT_STATUS_INVALID_LOGON_TYPE},
-       {ERRDOS,        1368,   NT_STATUS_CANNOT_IMPERSONATE},
-       {ERRDOS,        1056,   NT_STATUS_IMAGE_ALREADY_LOADED},
-       {ERRDOS,        1444,   NT_STATUS_NO_LDT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_MESSAGE_NOT_FOUND},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_PROCESS_IS_TERMINATING},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_LOGON_TYPE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_GUID_TRANSLATION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_CANNOT_IMPERSONATE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_IMAGE_ALREADY_LOADED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ABIOS_NOT_PRESENT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ABIOS_LID_NOT_EXIST},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ABIOS_LID_ALREADY_OWNED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ABIOS_NOT_LID_OWNER},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ABIOS_INVALID_COMMAND},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ABIOS_INVALID_LID},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ABIOS_SELECTOR_NOT_AVAILABLE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ABIOS_INVALID_SELECTOR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_LDT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_LDT_SIZE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_LDT_OFFSET},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_LDT_DESCRIPTOR},
        {ERRDOS,        193,    NT_STATUS_INVALID_IMAGE_NE_FORMAT},
-       {ERRDOS,        1369,   NT_STATUS_RXACT_INVALID_STATE},
-       {ERRDOS,        1370,   NT_STATUS_RXACT_COMMIT_FAILURE},
-       {ERRDOS,        1006,   NT_STATUS_MAPPED_FILE_SIZE_ZERO},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_RXACT_INVALID_STATE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_RXACT_COMMIT_FAILURE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_MAPPED_FILE_SIZE_ZERO},
        {ERRDOS,        ERRnofids,      NT_STATUS_TOO_MANY_OPENED_FILES},
-       {ERRDOS,        995,    NT_STATUS_CANCELLED},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS_CANNOT_DELETE},
-       {ERRDOS,        1210,   NT_STATUS_INVALID_COMPUTER_NAME},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS_FILE_DELETED},
-       {ERRDOS,        1371,   NT_STATUS_SPECIAL_ACCOUNT},
-       {ERRDOS,        1372,   NT_STATUS_SPECIAL_GROUP},
-       {ERRDOS,        1373,   NT_STATUS_SPECIAL_USER},
-       {ERRDOS,        1374,   NT_STATUS_MEMBERS_PRIMARY_GROUP},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_CANCELLED},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_CANNOT_DELETE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_COMPUTER_NAME},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_FILE_DELETED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_SPECIAL_ACCOUNT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_SPECIAL_GROUP},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_SPECIAL_USER},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_MEMBERS_PRIMARY_GROUP},
        {ERRDOS,        ERRbadfid,      NT_STATUS_FILE_CLOSED},
-       {ERRDOS,        1375,   NT_STATUS_TOKEN_ALREADY_IN_USE},
-       {ERRDOS,        1455,   NT_STATUS_COMMITMENT_LIMIT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_TOO_MANY_THREADS},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_THREAD_NOT_IN_PROCESS},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_TOKEN_ALREADY_IN_USE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PAGEFILE_QUOTA_EXCEEDED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_COMMITMENT_LIMIT},
        {ERRDOS,        193,    NT_STATUS_INVALID_IMAGE_LE_FORMAT},
        {ERRDOS,        193,    NT_STATUS_INVALID_IMAGE_NOT_MZ},
        {ERRDOS,        193,    NT_STATUS_INVALID_IMAGE_PROTECT},
        {ERRDOS,        193,    NT_STATUS_INVALID_IMAGE_WIN_16},
-       {ERRDOS,        1398,   NT_STATUS_TIME_DIFFERENCE_AT_DC},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_LOGON_SERVER_CONFLICT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_TIME_DIFFERENCE_AT_DC},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_SYNCHRONIZATION_REQUIRED},
        {ERRDOS,        126,    NT_STATUS_DLL_NOT_FOUND},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_OPEN_FAILED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_IO_PRIVILEGE_FAILED},
        {ERRDOS,        182,    NT_STATUS_ORDINAL_NOT_FOUND},
        {ERRDOS,        127,    NT_STATUS_ENTRYPOINT_NOT_FOUND},
-       {ERRSRV,        ERRinvnid,      NT_STATUS_LOCAL_DISCONNECT},
-       {ERRSRV,        ERRinvnid,      NT_STATUS_REMOTE_DISCONNECT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_CONTROL_C_EXIT},
+       {ERRDOS,        64,     NT_STATUS_LOCAL_DISCONNECT},
+       {ERRDOS,        64,     NT_STATUS_REMOTE_DISCONNECT},
        {ERRDOS,        51,     NT_STATUS_REMOTE_RESOURCES},
        {ERRDOS,        59,     NT_STATUS_LINK_FAILED},
        {ERRDOS,        59,     NT_STATUS_LINK_TIMEOUT},
        {ERRDOS,        59,     NT_STATUS_INVALID_CONNECTION},
        {ERRDOS,        59,     NT_STATUS_INVALID_ADDRESS},
-       {ERRDOS,        1114,   NT_STATUS_DLL_INIT_FAILED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DLL_INIT_FAILED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_MISSING_SYSTEMFILE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_UNHANDLED_EXCEPTION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_APP_INIT_FAILURE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PAGEFILE_CREATE_FAILED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_PAGEFILE},
        {ERRDOS,        124,    NT_STATUS_INVALID_LEVEL},
-       {ERRSRV,        ERRbadpw,       NT_STATUS_WRONG_PASSWORD_CORE},
+       {ERRDOS,        86,     NT_STATUS_WRONG_PASSWORD_CORE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ILLEGAL_FLOAT_CONTEXT},
        {ERRDOS,        109,    NT_STATUS_PIPE_BROKEN},
-       {ERRDOS,        1009,   NT_STATUS_REGISTRY_CORRUPT},
-       {ERRDOS,        1016,   NT_STATUS_REGISTRY_IO_FAILED},
-       {ERRDOS,        1005,   NT_STATUS_UNRECOGNIZED_VOLUME},
-       {ERRDOS,        1118,   NT_STATUS_SERIAL_NO_DEVICE_INITED},
-       {ERRDOS,        1376,   NT_STATUS_NO_SUCH_ALIAS},
-       {ERRDOS,        1377,   NT_STATUS_MEMBER_NOT_IN_ALIAS},
-       {ERRDOS,        1378,   NT_STATUS_MEMBER_IN_ALIAS},
-       {ERRDOS,        1379,   NT_STATUS_ALIAS_EXISTS},
-       {ERRDOS,        1380,   NT_STATUS_LOGON_NOT_GRANTED},
-       {ERRDOS,        1381,   NT_STATUS_TOO_MANY_SECRETS},
-       {ERRDOS,        1382,   NT_STATUS_SECRET_TOO_LONG},
-       {ERRDOS,        1383,   NT_STATUS_INTERNAL_DB_ERROR},
-       {ERRDOS,        1007,   NT_STATUS_FULLSCREEN_MODE},
-       {ERRDOS,        1384,   NT_STATUS_TOO_MANY_CONTEXT_IDS},
-       {ERRDOS,        1385,   NT_STATUS_LOGON_TYPE_NOT_GRANTED},
-       {ERRDOS,        1017,   NT_STATUS_NOT_REGISTRY_FILE},
-       {ERRDOS,        1386,   NT_STATUS_NT_CROSS_ENCRYPTION_REQUIRED},
-       {ERRDOS,        1117,   NT_STATUS_FT_MISSING_MEMBER},
-       {ERRDOS,        1113,   NT_STATUS_UNMAPPABLE_CHARACTER},
-       {ERRDOS,        1122,   NT_STATUS_FLOPPY_ID_MARK_NOT_FOUND},
-       {ERRDOS,        1123,   NT_STATUS_FLOPPY_WRONG_CYLINDER},
-       {ERRDOS,        1124,   NT_STATUS_FLOPPY_UNKNOWN_ERROR},
-       {ERRDOS,        1125,   NT_STATUS_FLOPPY_BAD_REGISTERS},
-       {ERRDOS,        1126,   NT_STATUS_DISK_RECALIBRATE_FAILED},
-       {ERRDOS,        1127,   NT_STATUS_DISK_OPERATION_FAILED},
-       {ERRDOS,        1128,   NT_STATUS_DISK_RESET_FAILED},
-       {ERRDOS,        1119,   NT_STATUS_SHARED_IRQ_BUSY},
-       {ERRDOS,        1117,   NT_STATUS_FT_ORPHANING},
-       {ERRDOS,        1105,   NT_STATUS_PARTITION_FAILURE},
-       {ERRDOS,        1106,   NT_STATUS_INVALID_BLOCK_LENGTH},
-       {ERRDOS,        1107,   NT_STATUS_DEVICE_NOT_PARTITIONED},
-       {ERRDOS,        1108,   NT_STATUS_UNABLE_TO_LOCK_MEDIA},
-       {ERRDOS,        1109,   NT_STATUS_UNABLE_TO_UNLOAD_MEDIA},
-       {ERRDOS,        1129,   NT_STATUS_EOM_OVERFLOW},
-       {ERRDOS,        1112,   NT_STATUS_NO_MEDIA},
-       {ERRDOS,        1387,   NT_STATUS_NO_SUCH_MEMBER},
-       {ERRDOS,        1388,   NT_STATUS_INVALID_MEMBER},
-       {ERRDOS,        1018,   NT_STATUS_KEY_DELETED},
-       {ERRDOS,        1019,   NT_STATUS_NO_LOG_SPACE},
-       {ERRDOS,        1389,   NT_STATUS_TOO_MANY_SIDS},
-       {ERRDOS,        1390,   NT_STATUS_LM_CROSS_ENCRYPTION_REQUIRED},
-       {ERRDOS,        1020,   NT_STATUS_KEY_HAS_CHILDREN},
-       {ERRDOS,        1021,   NT_STATUS_CHILD_MUST_BE_VOLATILE},
-       {ERRDOS,        ERRbadpipe,     NT_STATUS_DEVICE_CONFIGURATION_ERROR},
-       {ERRDOS,        1117,   NT_STATUS_DRIVER_INTERNAL_ERROR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_REGISTRY_CORRUPT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_REGISTRY_IO_FAILED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_EVENT_PAIR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_UNRECOGNIZED_VOLUME},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_SERIAL_NO_DEVICE_INITED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_SUCH_ALIAS},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_MEMBER_NOT_IN_ALIAS},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_MEMBER_IN_ALIAS},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ALIAS_EXISTS},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_LOGON_NOT_GRANTED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_TOO_MANY_SECRETS},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_SECRET_TOO_LONG},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INTERNAL_DB_ERROR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FULLSCREEN_MODE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_TOO_MANY_CONTEXT_IDS},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_LOGON_TYPE_NOT_GRANTED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NOT_REGISTRY_FILE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NT_CROSS_ENCRYPTION_REQUIRED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DOMAIN_CTRLR_CONFIG_ERROR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FT_MISSING_MEMBER},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ILL_FORMED_SERVICE_ENTRY},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ILLEGAL_CHARACTER},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_UNMAPPABLE_CHARACTER},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_UNDEFINED_CHARACTER},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FLOPPY_VOLUME},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FLOPPY_ID_MARK_NOT_FOUND},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FLOPPY_WRONG_CYLINDER},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FLOPPY_UNKNOWN_ERROR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FLOPPY_BAD_REGISTERS},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DISK_RECALIBRATE_FAILED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DISK_OPERATION_FAILED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DISK_RESET_FAILED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_SHARED_IRQ_BUSY},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FT_ORPHANING},
+       {ERRHRD,        ERRgeneral,     NT_STATUS(0xc000016e)},
+       {ERRHRD,        ERRgeneral,     NT_STATUS(0xc000016f)},
+       {ERRHRD,        ERRgeneral,     NT_STATUS(0xc0000170)},
+       {ERRHRD,        ERRgeneral,     NT_STATUS(0xc0000171)},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PARTITION_FAILURE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_BLOCK_LENGTH},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DEVICE_NOT_PARTITIONED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_UNABLE_TO_LOCK_MEDIA},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_UNABLE_TO_UNLOAD_MEDIA},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_EOM_OVERFLOW},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_MEDIA},
+       {ERRHRD,        ERRgeneral,     NT_STATUS(0xc0000179)},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_SUCH_MEMBER},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_MEMBER},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_KEY_DELETED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_LOG_SPACE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_TOO_MANY_SIDS},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_LM_CROSS_ENCRYPTION_REQUIRED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_KEY_HAS_CHILDREN},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_CHILD_MUST_BE_VOLATILE},
+       {ERRDOS,        87,     NT_STATUS_DEVICE_CONFIGURATION_ERROR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DRIVER_INTERNAL_ERROR},
        {ERRDOS,        22,     NT_STATUS_INVALID_DEVICE_STATE},
-       {ERRDOS,        1117,   NT_STATUS_IO_DEVICE_ERROR},
-       {ERRDOS,        1117,   NT_STATUS_DEVICE_PROTOCOL_ERROR},
-       {ERRDOS,        1502,   NT_STATUS_LOG_FILE_FULL},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_IO_DEVICE_ERROR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DEVICE_PROTOCOL_ERROR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_BACKUP_CONTROLLER},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_LOG_FILE_FULL},
        {ERRDOS,        19,     NT_STATUS_TOO_LATE},
-       {ERRDOS,        1786,   NT_STATUS_NO_TRUST_LSA_SECRET},
-       {ERRDOS,        1787,   NT_STATUS_NO_TRUST_SAM_ACCOUNT},
-       {ERRDOS,        1788,   NT_STATUS_TRUSTED_DOMAIN_FAILURE},
-       {ERRDOS,        1789,   NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE},
-       {ERRDOS,        1500,   NT_STATUS_EVENTLOG_FILE_CORRUPT},
-       {ERRDOS,        1501,   NT_STATUS_EVENTLOG_CANT_START},
-       {ERRDOS,        1790,   NT_STATUS_TRUST_FAILURE},
-       {ERRDOS,        1792,   NT_STATUS_NETLOGON_NOT_STARTED},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_NO_TRUST_LSA_SECRET},
+/*     { This NT error code was 'sqashed'
+        from NT_STATUS_NO_TRUST_SAM_ACCOUNT to NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE 
+        during the session setup }
+*/
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_NO_TRUST_SAM_ACCOUNT},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_TRUSTED_DOMAIN_FAILURE},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_EVENTLOG_FILE_CORRUPT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_EVENTLOG_CANT_START},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_TRUST_FAILURE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_MUTANT_LIMIT_EXCEEDED},
+       {ERRDOS,        ERRinvgroup,    NT_STATUS_NETLOGON_NOT_STARTED},
        {ERRSRV,        2239,   NT_STATUS_ACCOUNT_EXPIRED},
-       {ERRDOS,        1131,   NT_STATUS_POSSIBLE_DEADLOCK},
-       {ERRDOS,        1219,   NT_STATUS_NETWORK_CREDENTIAL_CONFLICT},
-       {ERRDOS,        1220,   NT_STATUS_REMOTE_SESSION_LIMIT},
-       {ERRDOS,        1503,   NT_STATUS_EVENTLOG_FILE_CHANGED},
-       {ERRDOS,        1807,   NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT},
-       {ERRDOS,        1808,   NT_STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT},
-       {ERRDOS,        1809,   NT_STATUS_NOLOGON_SERVER_TRUST_ACCOUNT},
-       {ERRDOS,        1810,   NT_STATUS_DOMAIN_TRUST_INCONSISTENT},
-       {ERRDOS,        1394,   NT_STATUS_NO_USER_SESSION_KEY},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_POSSIBLE_DEADLOCK},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NETWORK_CREDENTIAL_CONFLICT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_REMOTE_SESSION_LIMIT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_EVENTLOG_FILE_CHANGED},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_NOLOGON_SERVER_TRUST_ACCOUNT},
+/*     { This NT error code was 'sqashed'
+        from NT_STATUS_DOMAIN_TRUST_INCONSISTENT to NT_STATUS_LOGON_FAILURE 
+        during the session setup }
+*/
+       {ERRDOS,        ERRnoaccess,    NT_STATUS_DOMAIN_TRUST_INCONSISTENT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FS_DRIVER_REQUIRED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_USER_SESSION_KEY},
        {ERRDOS,        59,     NT_STATUS_USER_SESSION_DELETED},
-       {ERRDOS,        1815,   NT_STATUS_RESOURCE_LANG_NOT_FOUND},
-       {ERRDOS,        1130,   NT_STATUS_INSUFF_SERVER_RESOURCES},
-       {ERRDOS,        1784,   NT_STATUS_INVALID_BUFFER_SIZE},
-       {ERRDOS,        1214,   NT_STATUS_INVALID_ADDRESS_COMPONENT},
-       {ERRDOS,        1214,   NT_STATUS_INVALID_ADDRESS_WILDCARD},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_RESOURCE_LANG_NOT_FOUND},
+       {ERRDOS,        ERRnomem,       NT_STATUS_INSUFF_SERVER_RESOURCES},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_BUFFER_SIZE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_ADDRESS_COMPONENT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_ADDRESS_WILDCARD},
        {ERRDOS,        68,     NT_STATUS_TOO_MANY_ADDRESSES},
        {ERRDOS,        52,     NT_STATUS_ADDRESS_ALREADY_EXISTS},
-       {ERRSRV,        ERRinvnid,      NT_STATUS_ADDRESS_CLOSED},
-       {ERRSRV,        ERRinvnid,      NT_STATUS_CONNECTION_DISCONNECTED},
-       {ERRSRV,        ERRinvnid,      NT_STATUS_CONNECTION_RESET},
+       {ERRDOS,        64,     NT_STATUS_ADDRESS_CLOSED},
+       {ERRDOS,        64,     NT_STATUS_CONNECTION_DISCONNECTED},
+       {ERRDOS,        64,     NT_STATUS_CONNECTION_RESET},
        {ERRDOS,        68,     NT_STATUS_TOO_MANY_NODES},
        {ERRDOS,        59,     NT_STATUS_TRANSACTION_ABORTED},
        {ERRDOS,        59,     NT_STATUS_TRANSACTION_TIMED_OUT},
@@ -405,162 +494,96 @@ static struct {
        {ERRDOS,        59,     NT_STATUS_TRANSACTION_INVALID_TYPE},
        {ERRDOS,        ERRunsup,       NT_STATUS_NOT_SERVER_SESSION},
        {ERRDOS,        ERRunsup,       NT_STATUS_NOT_CLIENT_SESSION},
-       {ERRDOS,        6118,   NT_STATUS_NO_BROWSER_SERVERS_FOUND},
-       {ERRDOS,        1132,   NT_STATUS_MAPPED_ALIGNMENT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_CANNOT_LOAD_REGISTRY_FILE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DEBUG_ATTACH_FAILED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_SYSTEM_PROCESS_TERMINATED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DATA_NOT_ACCEPTED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_BROWSER_SERVERS_FOUND},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_VDM_HARD_ERROR},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DRIVER_CANCEL_TIMEOUT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_REPLY_MESSAGE_MISMATCH},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_MAPPED_ALIGNMENT},
        {ERRDOS,        193,    NT_STATUS_IMAGE_CHECKSUM_MISMATCH},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_LOST_WRITEBEHIND_DATA},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_CLIENT_SERVER_PARAMETERS_INVALID},
        {ERRSRV,        2242,   NT_STATUS_PASSWORD_MUST_CHANGE},
-       {ERRDOS,        1168,   NT_STATUS_NOT_FOUND},
-       {ERRDOS,        554,    NT_STATUS_DUPLICATE_OBJECTID},
-       {ERRDOS,        555,    NT_STATUS_OBJECTID_EXISTS},
-       {ERRDOS,        1237,   NT_STATUS_RETRY},
-       {ERRDOS,        1170,   NT_STATUS_PROPSET_NOT_FOUND},
-       {ERRDOS,        1908,   NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NOT_FOUND},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NOT_TINY_STREAM},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_RECOVERY_FAILURE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_STACK_OVERFLOW_READ},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FAIL_CHECK},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DUPLICATE_OBJECTID},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_OBJECTID_EXISTS},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_CONVERT_TO_LARGE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_RETRY},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FOUND_OUT_OF_SCOPE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ALLOCATE_BUCKET},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PROPSET_NOT_FOUND},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_MARSHALL_OVERFLOW},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_VARIANT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND},
        {ERRDOS,        ERRnoaccess,    NT_STATUS_ACCOUNT_LOCKED_OUT},
        {ERRDOS,        ERRbadfid,      NT_STATUS_HANDLE_NOT_CLOSABLE},
-       {ERRDOS,        1225,   NT_STATUS_CONNECTION_REFUSED},
-       {ERRDOS,        1226,   NT_STATUS_GRACEFUL_DISCONNECT},
-       {ERRDOS,        1227,   NT_STATUS_ADDRESS_ALREADY_ASSOCIATED},
-       {ERRDOS,        1228,   NT_STATUS_ADDRESS_NOT_ASSOCIATED},
-       {ERRDOS,        1229,   NT_STATUS_CONNECTION_INVALID},
-       {ERRDOS,        1230,   NT_STATUS_CONNECTION_ACTIVE},
-       {ERRDOS,        1231,   NT_STATUS_NETWORK_UNREACHABLE},
-       {ERRDOS,        1232,   NT_STATUS_HOST_UNREACHABLE},
-       {ERRDOS,        1233,   NT_STATUS_PROTOCOL_UNREACHABLE},
-       {ERRDOS,        1234,   NT_STATUS_PORT_UNREACHABLE},
-       {ERRDOS,        1235,   NT_STATUS_REQUEST_ABORTED},
-       {ERRDOS,        1236,   NT_STATUS_CONNECTION_ABORTED},
-       {ERRDOS,        1224,   NT_STATUS_USER_MAPPED_FILE},
-       {ERRDOS,        1238,   NT_STATUS_CONNECTION_COUNT_LIMIT},
-       {ERRDOS,        1239,   NT_STATUS_LOGIN_TIME_RESTRICTION},
-       {ERRDOS,        1240,   NT_STATUS_LOGIN_WKSTA_RESTRICTION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_CONNECTION_REFUSED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_GRACEFUL_DISCONNECT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ADDRESS_ALREADY_ASSOCIATED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_ADDRESS_NOT_ASSOCIATED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_CONNECTION_INVALID},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_CONNECTION_ACTIVE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NETWORK_UNREACHABLE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_HOST_UNREACHABLE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PROTOCOL_UNREACHABLE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PORT_UNREACHABLE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_REQUEST_ABORTED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_CONNECTION_ABORTED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_BAD_COMPRESSION_BUFFER},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_USER_MAPPED_FILE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_AUDIT_FAILED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_TIMER_RESOLUTION_NOT_SET},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_CONNECTION_COUNT_LIMIT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_LOGIN_TIME_RESTRICTION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_LOGIN_WKSTA_RESTRICTION},
        {ERRDOS,        193,    NT_STATUS_IMAGE_MP_UP_MISMATCH},
-       {ERRDOS,        1359,   NT_STATUS_LPC_REPLY_LOST},
-       {ERRDOS,        1232,   NT_STATUS_PATH_NOT_COVERED},
-       {ERRDOS,        1395,   NT_STATUS_LICENSE_QUOTA_EXCEEDED},
-       {ERRDOS,        1058,   NT_STATUS_PLUGPLAY_NO_DEVICE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS(0xc000024a)},
+       {ERRHRD,        ERRgeneral,     NT_STATUS(0xc000024b)},
+       {ERRHRD,        ERRgeneral,     NT_STATUS(0xc000024c)},
+       {ERRHRD,        ERRgeneral,     NT_STATUS(0xc000024d)},
+       {ERRHRD,        ERRgeneral,     NT_STATUS(0xc000024e)},
+       {ERRHRD,        ERRgeneral,     NT_STATUS(0xc000024f)},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INSUFFICIENT_LOGON_INFO},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_BAD_DLL_ENTRYPOINT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_BAD_SERVICE_ENTRYPOINT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_LPC_REPLY_LOST},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_IP_ADDRESS_CONFLICT1},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_IP_ADDRESS_CONFLICT2},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_REGISTRY_QUOTA_LIMIT},
+       {ERRSRV,        ERRbadtype,     NT_STATUS_PATH_NOT_COVERED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_NO_CALLBACK_ACTIVE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_LICENSE_QUOTA_EXCEEDED},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PWD_TOO_SHORT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PWD_TOO_RECENT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PWD_HISTORY_CONFLICT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS(0xc000025d)},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_PLUGPLAY_NO_DEVICE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_UNSUPPORTED_COMPRESSION},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_HW_PROFILE},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_INVALID_PLUGPLAY_DEVICE_PATH},
        {ERRDOS,        182,    NT_STATUS_DRIVER_ORDINAL_NOT_FOUND},
        {ERRDOS,        127,    NT_STATUS_DRIVER_ENTRYPOINT_NOT_FOUND},
        {ERRDOS,        288,    NT_STATUS_RESOURCE_NOT_OWNED},
-       {ERRDOS,        1142,   NT_STATUS_TOO_MANY_LINKS},
-       {ERRDOS,        4350,   NT_STATUS_FILE_IS_OFFLINE},
-       {ERRDOS,        2001,   NT_STATUS(0xc000026c)},
-       {ERRDOS,        1201,   NT_STATUS(0xc000026d)},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_TOO_MANY_LINKS},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_QUOTA_LIST_INCONSISTENT},
+       {ERRHRD,        ERRgeneral,     NT_STATUS_FILE_IS_OFFLINE},
        {ERRDOS,        21,     NT_STATUS(0xc000026e)},
-       {ERRDOS,        1169,   NT_STATUS(0xc0000272)},
-       {ERRDOS,        4390,   NT_STATUS(0xc0000275)},
-       {ERRDOS,        4393,   NT_STATUS(0xc0000276)},
-       {ERRDOS,        4394,   NT_STATUS(0xc0000277)},
-       {ERRDOS,        4392,   NT_STATUS(0xc0000278)},
-       {ERRDOS,        1920,   NT_STATUS(0xc0000279)},
-       {ERRDOS,        1921,   NT_STATUS(0xc0000280)},
        {ERRDOS,        161,    NT_STATUS(0xc0000281)},
-       {ERRDOS,        1160,   NT_STATUS(0xc0000283)},
-       {ERRDOS,        1161,   NT_STATUS(0xc0000284)},
-       {ERRDOS,        1162,   NT_STATUS(0xc0000285)},
-       {ERRDOS,        1163,   NT_STATUS(0xc0000286)},
-       {ERRDOS,        1164,   NT_STATUS(0xc0000287)},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS(0xc000028a)},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS(0xc000028b)},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS(0xc000028d)},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS(0xc000028e)},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS(0xc000028f)},
-       {ERRDOS,        ERRbadaccess,   NT_STATUS(0xc0000290)},
-       {ERRDOS,        6007,   NT_STATUS(0xc0000291)},
-       {ERRDOS,        6008,   NT_STATUS(0xc0000292)},
-       {ERRDOS,        6002,   NT_STATUS(0xc0000293)},
-       {ERRDOS,        4200,   NT_STATUS(0xc0000295)},
-       {ERRDOS,        4201,   NT_STATUS(0xc0000296)},
-       {ERRDOS,        4202,   NT_STATUS(0xc0000297)},
-       {ERRDOS,        4203,   NT_STATUS(0xc0000298)},
-       {ERRDOS,        8218,   NT_STATUS(0xc0000299)},
-       {ERRDOS,        8219,   NT_STATUS(0xc000029a)},
-       {ERRDOS,        8220,   NT_STATUS(0xc000029b)},
-       {ERRSRV,        ERRsmbcmd,      NT_STATUS(0xc000029c)},
-       {ERRDOS,        4351,   NT_STATUS(0xc000029d)},
-       {ERRDOS,        4352,   NT_STATUS(0xc000029e)},
-       {ERRDOS,        1172,   NT_STATUS(0xc000029f)},
-       {ERRDOS,        8202,   NT_STATUS(0xc00002a1)},
-       {ERRDOS,        8203,   NT_STATUS(0xc00002a2)},
-       {ERRDOS,        8204,   NT_STATUS(0xc00002a3)},
-       {ERRDOS,        8205,   NT_STATUS(0xc00002a4)},
-       {ERRDOS,        8206,   NT_STATUS(0xc00002a5)},
-       {ERRDOS,        8207,   NT_STATUS(0xc00002a6)},
-       {ERRDOS,        8208,   NT_STATUS(0xc00002a7)},
-       {ERRDOS,        8209,   NT_STATUS(0xc00002a8)},
-       {ERRDOS,        8210,   NT_STATUS(0xc00002a9)},
-       {ERRDOS,        8211,   NT_STATUS(0xc00002aa)},
-       {ERRDOS,        8212,   NT_STATUS(0xc00002ab)},
-       {ERRDOS,        8213,   NT_STATUS(0xc00002ac)},
-       {ERRDOS,        8214,   NT_STATUS(0xc00002ad)},
-       {ERRDOS,        8215,   NT_STATUS(0xc00002ae)},
-       {ERRDOS,        8216,   NT_STATUS(0xc00002af)},
-       {ERRDOS,        8217,   NT_STATUS(0xc00002b0)},
-       {ERRDOS,        8478,   NT_STATUS(0xc00002b1)},
-       {ERRDOS,        4391,   NT_STATUS(0xc00002b2)},
-       {ERRDOS,        1617,   NT_STATUS(0xc00002b6)},
-       {ERRDOS,        1178,   NT_STATUS(0xc00002b7)},
-       {ERRDOS,        1179,   NT_STATUS(0xc00002b8)},
-       {ERRDOS,        8228,   NT_STATUS(0xc00002c1)},
-       {ERRDOS,        1397,   NT_STATUS(0xc00002c3)},
-       {ERRDOS,        998,    NT_STATUS(0xc00002c5)},
-       {ERRDOS,        4213,   NT_STATUS(0xc00002c6)},
-       {ERRDOS,        4214,   NT_STATUS(0xc00002c7)},
-       {ERRDOS,        4328,   NT_STATUS(0xc00002ca)},
-       {ERRDOS,        8504,   NT_STATUS(0xc00002cb)},
-       {ERRDOS,        1251,   NT_STATUS(0xc00002cc)},
-       {ERRDOS,        8505,   NT_STATUS(0xc00002cd)},
-       {ERRDOS,        1181,   NT_STATUS(0xc00002cf)},
-       {ERRDOS,        8506,   NT_STATUS(0xc00002d0)},
-       {ERRDOS,        8513,   NT_STATUS(0xc00002d4)},
-       {ERRDOS,        8514,   NT_STATUS(0xc00002d5)},
-       {ERRDOS,        8515,   NT_STATUS(0xc00002d6)},
-       {ERRDOS,        8516,   NT_STATUS(0xc00002d7)},
-       {ERRDOS,        8517,   NT_STATUS(0xc00002d8)},
-       {ERRDOS,        8518,   NT_STATUS(0xc00002d9)},
-       {ERRDOS,        8519,   NT_STATUS(0xc00002da)},
-       {ERRDOS,        8520,   NT_STATUS(0xc00002db)},
-       {ERRDOS,        8521,   NT_STATUS(0xc00002dc)},
-       {ERRDOS,        ERRunsup,       NT_STATUS(0xc00002dd)},
-       {ERRDOS,        8529,   NT_STATUS(0xc00002df)},
-       {ERRDOS,        8530,   NT_STATUS(0xc00002e0)},
-       {ERRDOS,        8531,   NT_STATUS(0xc00002e1)},
-       {ERRDOS,        8532,   NT_STATUS(0xc00002e2)},
-       {ERRDOS,        8541,   NT_STATUS(0xc00002e3)},
-       {ERRDOS,        8547,   NT_STATUS(0xc00002e4)},
-       {ERRDOS,        8548,   NT_STATUS(0xc00002e5)},
-       {ERRDOS,        8549,   NT_STATUS(0xc00002e6)},
-       {ERRDOS,        8557,   NT_STATUS(0xc00002e7)},
-       {ERRDOS,        1115,   NT_STATUS(0xc00002fe)},
-       {ERRDOS,        1255,   NT_STATUS(0xc00002ff)},
-       {ERRDOS,        1254,   NT_STATUS(0xc0000300)},
-       {ERRDOS,        ERRbadfunc,     NT_STATUS(0x80000001)},
-       {ERRDOS,        998,    NT_STATUS(0x80000002)},
-       {ERRDOS,        ERRbadpath,     NT_STATUS(0x80000003)},
-       {ERRDOS,        ERRnofids,      NT_STATUS(0x80000004)},
-       {ERRDOS,        234,    NT_STATUS(0x80000005)},
-       {ERRDOS,        ERRnofiles,     NT_STATUS(0x80000006)},
-       {ERRDOS,        1391,   NT_STATUS(0x8000000b)},
-       {ERRDOS,        299,    NT_STATUS(0x8000000d)},
-       {ERRDOS,        28,     NT_STATUS(0x8000000e)},
-       {ERRDOS,        21,     NT_STATUS(0x8000000f)},
-       {ERRDOS,        21,     NT_STATUS(0x80000010)},
-       {ERRDOS,        170,    NT_STATUS(0x80000011)},
-       {ERRDOS,        259,    NT_STATUS(0x80000012)},
-       {ERRDOS,        254,    NT_STATUS(0x80000013)},
-       {ERRDOS,        275,    NT_STATUS(0x80000014)},
-       {ERRDOS,        275,    NT_STATUS(0x80000015)},
-       {ERRDOS,        1110,   NT_STATUS(0x80000016)},
-       {ERRDOS,        259,    NT_STATUS_UNABLE_TO_FREE_VM},
-       {ERRDOS,        1101,   NT_STATUS(0x8000001b)},
-       {ERRDOS,        1110,   NT_STATUS(0x8000001c)},
-       {ERRDOS,        1111,   NT_STATUS(0x8000001d)},
-       {ERRDOS,        1100,   NT_STATUS(0x8000001e)},
-       {ERRDOS,        1102,   NT_STATUS(0x8000001f)},
-       {ERRDOS,        1103,   NT_STATUS(0x80000021)},
-       {ERRDOS,        1104,   NT_STATUS(0x80000022)},
-       {ERRDOS,        2402,   NT_STATUS(0x80000025)},
-       {ERRDOS,        1165,   NT_STATUS(0x80000288)},
-       {ERRDOS,        1166,   NT_STATUS(0x80000289)},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS(0xc000028a)},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS(0xc000028b)},
+       {ERRHRD,        ERRgeneral,     NT_STATUS(0xc000028c)},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS(0xc000028d)},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS(0xc000028e)},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS(0xc000028f)},
+       {ERRDOS,        ERRnoaccess,    NT_STATUS(0xc0000290)},
+       {ERRDOS,        ERRbadfunc,     NT_STATUS(0xc000029c)},
 };
 
 
@@ -647,7 +670,7 @@ static struct {
        {ERRDOS,        ERRpipebusy,    NT_STATUS_INSTANCE_NOT_AVAILABLE},
        {ERRDOS,        ERRpipeclosing, NT_STATUS_PIPE_CLOSING},
        {ERRDOS,        ERRnotconnected,        NT_STATUS_PIPE_DISCONNECTED},
-       {ERRDOS,        ERRmoredata,    STATUS_MORE_ENTRIES},
+       {ERRDOS,        ERRmoredata,    NT_STATUS_MORE_PROCESSING_REQUIRED},
        {ERRDOS,        240,    NT_STATUS_VIRTUAL_CIRCUIT_CLOSED},
        {ERRDOS,        254,    NT_STATUS(0x80000013)},
        {ERRDOS,        255,    NT_STATUS_EA_TOO_LARGE},
index 71e609ff3a7fad12f04fd60c34e7c5faf2e138bc..b6e6f03740e61c454b5fdd8c818ed70b9643f93d 100644 (file)
@@ -51,14 +51,14 @@ err_code_struct dos_msgs[] = {
   {"ERRnofids",ERRnofids,"No file descriptors available"},
   {"ERRnoaccess",ERRnoaccess,"Access denied."},
   {"ERRbadfid",ERRbadfid,"Invalid file handle."},
-  {"ERRbadmcb",7,"Memory control blocks destroyed."},
+  {"ERRbadmcb",ERRbadmcb,"Memory control blocks destroyed."},
   {"ERRnomem",ERRnomem,"Insufficient server memory to perform the requested function."},
   {"ERRbadmem",ERRbadmem,"Invalid memory block address."},
   {"ERRbadenv",ERRbadenv,"Invalid environment."},
   {"ERRbadformat",11,"Invalid format."},
   {"ERRbadaccess",ERRbadaccess,"Invalid open mode."},
   {"ERRbaddata",ERRbaddata,"Invalid data."},
-  {"ERR",ERRres,"reserved."},
+  {"ERRres",ERRres,"reserved."},
   {"ERRbaddrive",ERRbaddrive,"Invalid drive specified."},
   {"ERRremcd",ERRremcd,"A Delete Directory request attempted  to  remove  the  server's  current directory."},
   {"ERRdiffdevice",ERRdiffdevice,"Not same device."},
@@ -74,7 +74,7 @@ err_code_struct dos_msgs[] = {
   {"ERRpipeclosing",ERRpipeclosing,"Pipe close in progress."},
   {"ERRnotconnected",ERRnotconnected,"No process on other end of pipe."},
   {"ERRmoredata",ERRmoredata,"There is more data to be returned."},
-  {"ERRinvgroup",2455,"Invalid workgroup (try the -W option)"},
+  {"ERRinvgroup",ERRinvgroup,"Invalid workgroup (try the -W option)"},
   {"ERRlogonfailure",ERRlogonfailure,"Logon failure"},
   {"ERRdiskfull",ERRdiskfull,"Disk full"},
   {NULL,-1,NULL}};
index fbc17e0c6b5389ed34877222db7d53a6fdb88305..c8fe9dc0cfb548b2176ef07a1847444339784d6c 100644 (file)
@@ -2926,7 +2926,7 @@ static BOOL run_error_map_extract(int dummy) {
                if (flgs2 & FLAGS2_32_BIT_ERROR_CODES) {
                        nt_status = NT_STATUS(IVAL(c_nt.inbuf,smb_rcls));
                } else {
-                       printf("/** Dos error on NT connection! (%s)\n */", 
+                       printf("/** Dos error on NT connection! (%s) */\n", 
                               cli_errstr(&c_nt));
                        nt_status = NT_STATUS(0xc0000000);
                }
@@ -2941,7 +2941,7 @@ static BOOL run_error_map_extract(int dummy) {
                
                /* Case #1: 32-bit NT errors */
                if (flgs2 & FLAGS2_32_BIT_ERROR_CODES) {
-                       printf("/** NT error on DOS connection! (%s)\n*/", 
+                       printf("/** NT error on DOS connection! (%s) */\n", 
                               cli_errstr(&c_nt));
                        errnum = errclass = 0;
                } else {
@@ -2957,7 +2957,7 @@ static BOOL run_error_map_extract(int dummy) {
                printf("\t{%s,\t%s,\t%s},\n", 
                       smb_dos_err_class(errclass), 
                       smb_dos_err_name(errclass, errnum), 
-                      get_nt_error_c_code(nt_status));
+                      get_nt_error_c_code(NT_STATUS(error)));
        }
        return True;
 }