From ee5f7237decfe446f4fdb08422beb2e6cb43af7f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 27 Aug 2001 17:52:23 +0000 Subject: started converting NTSTATUS to be a structure on systems with gcc in order to make it type incompatible with BOOL so we catch errors sooner. This has already found a number of bugs (This used to be commit 1b778bc7d22efff3f90dc450eb12baa1241cf68f) --- source3/libsmb/errormap.c | 854 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 854 insertions(+) create mode 100644 source3/libsmb/errormap.c (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c new file mode 100644 index 0000000000..92a4b19847 --- /dev/null +++ b/source3/libsmb/errormap.c @@ -0,0 +1,854 @@ +/* + * Unix SMB/Netbios implementation. + * Version 3.0 + * error mapping functions + * Copyright (C) Andrew Tridgell 2001 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "includes.h" + +/* NT status -> dos error map */ +static struct { + uint8 dos_class; + 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, 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}, + {ERRDOS, ERRbadfid, NT_STATUS_INVALID_HANDLE}, + {ERRDOS, 1001, 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, ERRbadfile, NT_STATUS_NO_SUCH_DEVICE}, + {ERRDOS, ERRbadfile, NT_STATUS_NO_SUCH_FILE}, + {ERRSRV, ERRsmbcmd, 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}, + {ERRDOS, 27, NT_STATUS_NONEXISTENT_SECTOR}, + {ERRDOS, 111, NT_STATUS_MORE_PROCESSING_REQUIRED}, + {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, 193, NT_STATUS_INVALID_FILE_FOR_SECTION}, + {ERRDOS, ERRbadaccess, NT_STATUS_ALREADY_COMMITTED}, + {ERRDOS, ERRbadaccess, NT_STATUS_ACCESS_DENIED}, + {ERRDOS, 122, NT_STATUS_BUFFER_TOO_SMALL}, + {ERRDOS, ERRbadfid, NT_STATUS_OBJECT_TYPE_MISMATCH}, + {ERRDOS, 37, NT_STATUS_NONCONTINUABLE_EXCEPTION}, + {ERRDOS, 38, NT_STATUS_INVALID_DISPOSITION}, + {ERRDOS, 158, NT_STATUS_NOT_LOCKED}, + {ERRDOS, 43, 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}, + {ERRDOS, ERRbadfile, NT_STATUS_OBJECT_NAME_NOT_FOUND}, + {ERRDOS, ERRfilexists, NT_STATUS_OBJECT_NAME_COLLISION}, + {ERRDOS, ERRbadfid, NT_STATUS_PORT_DISCONNECTED}, + {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}, + {ERRDOS, ERRnomem, NT_STATUS_SECTION_TOO_BIG}, + {ERRDOS, ERRbadaccess, 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}, + {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, 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, 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, ERRlock, NT_STATUS_FILE_LOCK_CONFLICT}, + {ERRDOS, ERRlock, NT_STATUS_LOCK_NOT_GRANTED}, + {ERRDOS, ERRbadaccess, 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, 1326, NT_STATUS_LOGON_FAILURE}, + {ERRDOS, 1327, NT_STATUS_ACCOUNT_RESTRICTION}, + {ERRDOS, 1328, NT_STATUS_INVALID_LOGON_HOURS}, + {ERRDOS, 1329, NT_STATUS_INVALID_WORKSTATION}, + {ERRDOS, 1330, NT_STATUS_PASSWORD_EXPIRED}, + {ERRDOS, 1331, 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}, + {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}, + {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, 68, NT_STATUS_TOO_MANY_GUIDS_REQUESTED}, + {ERRDOS, 259, NT_STATUS_GUIDS_EXHAUSTED}, + {ERRDOS, 1343, 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, 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}, + {ERRDOS, 534, NT_STATUS_INTEGER_OVERFLOW}, + {ERRDOS, 150, 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}, + {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, 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}, + {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}, + {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, ERRnotconnected, NT_STATUS_PIPE_DISCONNECTED}, + {ERRDOS, ERRpipeclosing, NT_STATUS_PIPE_CLOSING}, + {ERRDOS, 535, NT_STATUS_PIPE_CONNECTED}, + {ERRDOS, 536, 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}, + {ERRDOS, ERRunsup, NT_STATUS_NOT_SUPPORTED}, + {ERRDOS, 51, NT_STATUS_REMOTE_NOT_LISTENING}, + {ERRDOS, 52, NT_STATUS_DUPLICATE_NAME}, + {ERRDOS, 53, NT_STATUS_BAD_NETWORK_PATH}, + {ERRDOS, 54, NT_STATUS_NETWORK_BUSY}, + {ERRDOS, 55, NT_STATUS_DEVICE_DOES_NOT_EXIST}, + {ERRDOS, 56, NT_STATUS_TOO_MANY_COMMANDS}, + {ERRDOS, 57, NT_STATUS_ADAPTER_HARDWARE_ERROR}, + {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, 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, 72, NT_STATUS_REDIRECTOR_PAUSED}, + {ERRDOS, 88, NT_STATUS_NET_WRITE_FAULT}, + {ERRDOS, ERRdiffdevice, NT_STATUS_NOT_SAME_DEVICE}, + {ERRDOS, ERRbadaccess, NT_STATUS_FILE_RENAMED}, + {ERRDOS, 240, NT_STATUS_VIRTUAL_CIRCUIT_CLOSED}, + {ERRDOS, 1350, NT_STATUS_NO_SECURITY_ON_OBJECT}, + {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}, + {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}, + {ERRDOS, ERRbadpath, NT_STATUS_REDIRECTOR_NOT_STARTED}, + {ERRDOS, 1001, NT_STATUS_STACK_OVERFLOW}, + {ERRDOS, 1364, NT_STATUS_NO_SUCH_PACKAGE}, + {ERRDOS, 203, NT_STATUS(0xc0000100)}, + {ERRDOS, ERRremcd, NT_STATUS_DIRECTORY_NOT_EMPTY}, + {ERRDOS, 276, 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}, + {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}, + {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}, + {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}, + {ERRDOS, ERRbadfid, NT_STATUS_FILE_CLOSED}, + {ERRDOS, 1375, NT_STATUS_TOKEN_ALREADY_IN_USE}, + {ERRDOS, 1455, 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}, + {ERRDOS, 126, NT_STATUS_DLL_NOT_FOUND}, + {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}, + {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}, + {ERRDOS, 124, NT_STATUS_INVALID_LEVEL}, + {ERRSRV, ERRbadpw, NT_STATUS_WRONG_PASSWORD_CORE}, + {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}, + {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}, + {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, 1793, 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}, + {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}, + {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, 68, NT_STATUS_TOO_MANY_NODES}, + {ERRDOS, 59, NT_STATUS_TRANSACTION_ABORTED}, + {ERRDOS, 59, NT_STATUS_TRANSACTION_TIMED_OUT}, + {ERRDOS, 59, NT_STATUS_TRANSACTION_NO_RELEASE}, + {ERRDOS, 59, NT_STATUS_TRANSACTION_NO_MATCH}, + {ERRDOS, 59, NT_STATUS_TRANSACTION_RESPONDED}, + {ERRDOS, 59, NT_STATUS_TRANSACTION_INVALID_ID}, + {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}, + {ERRDOS, 193, NT_STATUS_IMAGE_CHECKSUM_MISMATCH}, + {ERRDOS, 1907, 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}, + {ERRDOS, 1909, 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}, + {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}, + {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)}, + {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, 111, 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)}, +}; + + +/* dos -> nt status error map */ +static struct { + uint8 dos_class; + uint32 dos_code; + NTSTATUS ntstatus; +} dos_to_ntstatus_map[] = { + {ERRDOS, ERRbadfunc, NT_STATUS_NOT_IMPLEMENTED}, + {ERRDOS, ERRbadfile, NT_STATUS_NO_SUCH_FILE}, + {ERRDOS, ERRbadpath, NT_STATUS_OBJECT_PATH_NOT_FOUND}, + {ERRDOS, ERRnofids, NT_STATUS_TOO_MANY_OPENED_FILES}, + {ERRDOS, ERRnoaccess, NT_STATUS_INVALID_LOCK_SEQUENCE}, + {ERRDOS, ERRbadfid, NT_STATUS_INVALID_HANDLE}, + {ERRDOS, ERRnomem, NT_STATUS_INSUFFICIENT_RESOURCES}, + {ERRDOS, ERRbadaccess, NT_STATUS_INVALID_LOCK_SEQUENCE}, + {ERRDOS, ERRbaddata, NT_STATUS_DATA_ERROR}, + {ERRDOS, 14, NT_STATUS_SECTION_NOT_EXTENDED}, + {ERRDOS, ERRremcd, NT_STATUS_DIRECTORY_NOT_EMPTY}, + {ERRDOS, ERRdiffdevice, NT_STATUS_NOT_SAME_DEVICE}, + {ERRDOS, ERRnofiles, NT_STATUS(0x80000006)}, + {ERRDOS, 19, NT_STATUS_MEDIA_WRITE_PROTECTED}, + {ERRDOS, 21, NT_STATUS_NO_MEDIA_IN_DEVICE}, + {ERRDOS, 22, NT_STATUS_INVALID_DEVICE_STATE}, + {ERRDOS, 23, NT_STATUS_DATA_ERROR}, + {ERRDOS, 24, NT_STATUS_DATA_ERROR}, + {ERRDOS, 26, NT_STATUS_DISK_CORRUPT_ERROR}, + {ERRDOS, 27, NT_STATUS_NONEXISTENT_SECTOR}, + {ERRDOS, 28, NT_STATUS(0x8000000e)}, + {ERRDOS, 31, NT_STATUS_UNSUCCESSFUL}, + {ERRDOS, ERRbadshare, NT_STATUS_SHARING_VIOLATION}, + {ERRDOS, ERRlock, NT_STATUS_FILE_LOCK_CONFLICT}, + {ERRDOS, 34, NT_STATUS_WRONG_VOLUME}, + {ERRDOS, 38, NT_STATUS_END_OF_FILE}, + {ERRDOS, ERRunsup, NT_STATUS_CTL_FILE_NOT_SUPPORTED}, + {ERRDOS, 51, NT_STATUS_REMOTE_NOT_LISTENING}, + {ERRDOS, 52, NT_STATUS_DUPLICATE_NAME}, + {ERRDOS, 53, NT_STATUS_BAD_NETWORK_PATH}, + {ERRDOS, 54, NT_STATUS_NETWORK_BUSY}, + {ERRDOS, 55, NT_STATUS_DEVICE_DOES_NOT_EXIST}, + {ERRDOS, 56, NT_STATUS_TOO_MANY_COMMANDS}, + {ERRDOS, 57, NT_STATUS_ADAPTER_HARDWARE_ERROR}, + {ERRDOS, 58, NT_STATUS_INVALID_NETWORK_RESPONSE}, + {ERRDOS, 59, NT_STATUS_UNEXPECTED_NETWORK_ERROR}, + {ERRDOS, 60, NT_STATUS_BAD_REMOTE_ADAPTER}, + {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_GUIDS_REQUESTED}, + {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, ERRfilexists, NT_STATUS_OBJECT_NAME_COLLISION}, + {ERRDOS, 86, NT_STATUS_WRONG_PASSWORD}, + {ERRDOS, 87, NT_STATUS_INVALID_INFO_CLASS}, + {ERRDOS, 88, NT_STATUS_NET_WRITE_FAULT}, + {ERRDOS, 109, NT_STATUS_PIPE_BROKEN}, + {ERRDOS, 111, STATUS_MORE_ENTRIES}, + {ERRDOS, 112, NT_STATUS_DISK_FULL}, + {ERRDOS, 121, NT_STATUS_IO_TIMEOUT}, + {ERRDOS, 122, NT_STATUS_BUFFER_TOO_SMALL}, + {ERRDOS, ERRinvalidname, NT_STATUS_OBJECT_NAME_INVALID}, + {ERRDOS, 124, NT_STATUS_INVALID_LEVEL}, + {ERRDOS, 126, NT_STATUS_DLL_NOT_FOUND}, + {ERRDOS, 127, NT_STATUS_PROCEDURE_NOT_FOUND}, + {ERRDOS, 145, NT_STATUS_DIRECTORY_NOT_EMPTY}, + {ERRDOS, 154, NT_STATUS_INVALID_VOLUME_LABEL}, + {ERRDOS, 156, NT_STATUS_SUSPEND_COUNT_EXCEEDED}, + {ERRDOS, 158, NT_STATUS_NOT_LOCKED}, + {ERRDOS, 161, NT_STATUS_OBJECT_PATH_INVALID}, + {ERRDOS, 170, NT_STATUS(0x80000011)}, + {ERRDOS, 182, NT_STATUS_ORDINAL_NOT_FOUND}, + {ERRDOS, 183, NT_STATUS_OBJECT_NAME_COLLISION}, + {ERRDOS, 193, NT_STATUS_BAD_INITIAL_PC}, + {ERRDOS, 203, NT_STATUS(0xc0000100)}, + {ERRDOS, 206, NT_STATUS_NAME_TOO_LONG}, + {ERRDOS, ERRbadpipe, NT_STATUS_INVALID_INFO_CLASS}, + {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, 240, NT_STATUS_VIRTUAL_CIRCUIT_CLOSED}, + {ERRDOS, 254, NT_STATUS(0x80000013)}, + {ERRDOS, 255, NT_STATUS_EA_TOO_LARGE}, + {ERRDOS, 259, NT_STATUS_GUIDS_EXHAUSTED}, + {ERRDOS, 267, NT_STATUS_NOT_A_DIRECTORY}, + {ERRDOS, 275, NT_STATUS_EA_TOO_LARGE}, + {ERRDOS, 276, NT_STATUS_NONEXISTENT_EA_ENTRY}, + {ERRDOS, 277, NT_STATUS_NONEXISTENT_EA_ENTRY}, + {ERRDOS, 278, NT_STATUS_NONEXISTENT_EA_ENTRY}, + {ERRDOS, 282, NT_STATUS_EAS_NOT_SUPPORTED}, + {ERRDOS, 288, NT_STATUS_MUTANT_NOT_OWNED}, + {ERRDOS, 298, NT_STATUS_SEMAPHORE_LIMIT_EXCEEDED}, + {ERRDOS, 299, NT_STATUS(0x8000000d)}, + {ERRDOS, 300, NT_STATUS_OPLOCK_NOT_GRANTED}, + {ERRDOS, 301, NT_STATUS_INVALID_OPLOCK_PROTOCOL}, + {ERRDOS, 487, NT_STATUS_CONFLICTING_ADDRESSES}, + {ERRDOS, 534, NT_STATUS_INTEGER_OVERFLOW}, + {ERRDOS, 535, NT_STATUS_PIPE_CONNECTED}, + {ERRDOS, 536, NT_STATUS_PIPE_LISTENING}, + {ERRDOS, 995, NT_STATUS_CANCELLED}, + {ERRDOS, 997, NT_STATUS(0x00000103)}, + {ERRDOS, 998, NT_STATUS_ACCESS_VIOLATION}, + {ERRDOS, 999, NT_STATUS_IN_PAGE_ERROR}, + {ERRDOS, 1001, NT_STATUS_BAD_INITIAL_STACK}, + {ERRDOS, 1005, NT_STATUS_UNRECOGNIZED_VOLUME}, + {ERRDOS, 1006, NT_STATUS_FILE_INVALID}, + {ERRDOS, 1007, NT_STATUS_FULLSCREEN_MODE}, + {ERRDOS, 1008, NT_STATUS_NO_TOKEN}, + {ERRDOS, 1009, NT_STATUS_REGISTRY_CORRUPT}, + {ERRDOS, 1016, NT_STATUS_REGISTRY_IO_FAILED}, + {ERRDOS, 1017, NT_STATUS_NOT_REGISTRY_FILE}, + {ERRDOS, 1018, NT_STATUS_KEY_DELETED}, + {ERRDOS, 1019, NT_STATUS_NO_LOG_SPACE}, + {ERRDOS, 1020, NT_STATUS_KEY_HAS_CHILDREN}, + {ERRDOS, 1021, NT_STATUS_CHILD_MUST_BE_VOLATILE}, + {ERRDOS, 1022, NT_STATUS(0x0000010c)}, + {ERRSRV, ERRbadpw, NT_STATUS_WRONG_PASSWORD}, + {ERRSRV, ERRbadtype, NT_STATUS_BAD_DEVICE_TYPE}, + {ERRSRV, ERRaccess, NT_STATUS_NETWORK_ACCESS_DENIED}, + {ERRSRV, ERRinvnid, NT_STATUS_NETWORK_NAME_DELETED}, + {ERRSRV, ERRinvnetname, NT_STATUS_BAD_NETWORK_NAME}, + {ERRSRV, ERRinvdevice, NT_STATUS_BAD_DEVICE_TYPE}, + {ERRSRV, ERRqfull, NT_STATUS_PRINT_QUEUE_FULL}, + {ERRSRV, ERRqtoobig, NT_STATUS_NO_SPOOL_SPACE}, + {ERRSRV, ERRinvpfid, NT_STATUS_PRINT_CANCELLED}, + {ERRSRV, ERRsmbcmd, NT_STATUS_NOT_IMPLEMENTED}, + {ERRSRV, ERRbadpermits, NT_STATUS_NETWORK_ACCESS_DENIED}, + {ERRSRV, ERRpaused, NT_STATUS_SHARING_PAUSED}, + {ERRSRV, ERRmsgoff, NT_STATUS_REQUEST_NOT_ACCEPTED}, + {ERRSRV, ERRnoroom, NT_STATUS_DISK_FULL}, + {ERRSRV, ERRnoresource, NT_STATUS_REQUEST_NOT_ACCEPTED}, + {ERRSRV, ERRtoomanyuids, NT_STATUS_TOO_MANY_SESSIONS}, + {ERRSRV, 123, NT_STATUS_OBJECT_NAME_INVALID}, + {ERRSRV, 206, NT_STATUS_OBJECT_NAME_INVALID}, + {ERRHRD, 1, NT_STATUS_NOT_IMPLEMENTED}, + {ERRHRD, 2, NT_STATUS_NO_SUCH_DEVICE}, + {ERRHRD, 3, NT_STATUS_OBJECT_PATH_NOT_FOUND}, + {ERRHRD, 4, NT_STATUS_TOO_MANY_OPENED_FILES}, + {ERRHRD, 5, NT_STATUS_INVALID_LOCK_SEQUENCE}, + {ERRHRD, 6, NT_STATUS_INVALID_HANDLE}, + {ERRHRD, 8, NT_STATUS_INSUFFICIENT_RESOURCES}, + {ERRHRD, 12, NT_STATUS_INVALID_LOCK_SEQUENCE}, + {ERRHRD, 13, NT_STATUS_DATA_ERROR}, + {ERRHRD, 14, NT_STATUS_SECTION_NOT_EXTENDED}, + {ERRHRD, 16, NT_STATUS_DIRECTORY_NOT_EMPTY}, + {ERRHRD, 17, NT_STATUS_NOT_SAME_DEVICE}, + {ERRHRD, 18, NT_STATUS(0x80000006)}, + {ERRHRD, ERRnowrite, NT_STATUS_MEDIA_WRITE_PROTECTED}, + {ERRHRD, ERRnotready, NT_STATUS_NO_MEDIA_IN_DEVICE}, + {ERRHRD, ERRbadcmd, NT_STATUS_INVALID_DEVICE_STATE}, + {ERRHRD, ERRdata, NT_STATUS_DATA_ERROR}, + {ERRHRD, ERRbadreq, NT_STATUS_DATA_ERROR}, + {ERRHRD, ERRbadmedia, NT_STATUS_DISK_CORRUPT_ERROR}, + {ERRHRD, ERRbadsector, NT_STATUS_NONEXISTENT_SECTOR}, + {ERRHRD, ERRnopaper, NT_STATUS(0x8000000e)}, + {ERRHRD, ERRgeneral, NT_STATUS_UNSUCCESSFUL}, + {ERRHRD, ERRbadshare, NT_STATUS_SHARING_VIOLATION}, + {ERRHRD, ERRlock, NT_STATUS_FILE_LOCK_CONFLICT}, + {ERRHRD, ERRwrongdisk, NT_STATUS_WRONG_VOLUME}, + {ERRHRD, 38, NT_STATUS_END_OF_FILE}, + {ERRHRD, 50, NT_STATUS_CTL_FILE_NOT_SUPPORTED}, + {ERRHRD, 51, NT_STATUS_REMOTE_NOT_LISTENING}, + {ERRHRD, 52, NT_STATUS_DUPLICATE_NAME}, + {ERRHRD, 53, NT_STATUS_BAD_NETWORK_PATH}, + {ERRHRD, 54, NT_STATUS_NETWORK_BUSY}, + {ERRHRD, 55, NT_STATUS_DEVICE_DOES_NOT_EXIST}, + {ERRHRD, 56, NT_STATUS_TOO_MANY_COMMANDS}, + {ERRHRD, 57, NT_STATUS_ADAPTER_HARDWARE_ERROR}, + {ERRHRD, 58, NT_STATUS_INVALID_NETWORK_RESPONSE}, + {ERRHRD, 59, NT_STATUS_UNEXPECTED_NETWORK_ERROR}, + {ERRHRD, 60, NT_STATUS_BAD_REMOTE_ADAPTER}, + {ERRHRD, 61, NT_STATUS_PRINT_QUEUE_FULL}, + {ERRHRD, 62, NT_STATUS_NO_SPOOL_SPACE}, + {ERRHRD, 63, NT_STATUS_PRINT_CANCELLED}, + {ERRHRD, 64, NT_STATUS_NETWORK_NAME_DELETED}, + {ERRHRD, 65, NT_STATUS_NETWORK_ACCESS_DENIED}, + {ERRHRD, 66, NT_STATUS_BAD_DEVICE_TYPE}, + {ERRHRD, 67, NT_STATUS_BAD_NETWORK_NAME}, + {ERRHRD, 68, NT_STATUS_TOO_MANY_GUIDS_REQUESTED}, + {ERRHRD, 69, NT_STATUS_TOO_MANY_SESSIONS}, + {ERRHRD, 70, NT_STATUS_SHARING_PAUSED}, + {ERRHRD, 71, NT_STATUS_REQUEST_NOT_ACCEPTED}, + {ERRHRD, 72, NT_STATUS_REDIRECTOR_PAUSED}, + {ERRHRD, 80, NT_STATUS_OBJECT_NAME_COLLISION}, + {ERRHRD, 86, NT_STATUS_WRONG_PASSWORD}, + {ERRHRD, 87, NT_STATUS_INVALID_INFO_CLASS}, + {ERRHRD, 88, NT_STATUS_NET_WRITE_FAULT}, + {ERRHRD, 109, NT_STATUS_PIPE_BROKEN}, + {ERRHRD, 111, STATUS_MORE_ENTRIES}, + {ERRHRD, 112, NT_STATUS_DISK_FULL}, + {ERRHRD, 121, NT_STATUS_IO_TIMEOUT}, + {ERRHRD, 122, NT_STATUS_BUFFER_TOO_SMALL}, + {ERRHRD, 123, NT_STATUS_OBJECT_NAME_INVALID}, + {ERRHRD, 124, NT_STATUS_INVALID_LEVEL}, + {ERRHRD, 126, NT_STATUS_DLL_NOT_FOUND}, + {ERRHRD, 127, NT_STATUS_PROCEDURE_NOT_FOUND}, + {ERRHRD, 145, NT_STATUS_DIRECTORY_NOT_EMPTY}, + {ERRHRD, 154, NT_STATUS_INVALID_VOLUME_LABEL}, + {ERRHRD, 156, NT_STATUS_SUSPEND_COUNT_EXCEEDED}, + {ERRHRD, 158, NT_STATUS_NOT_LOCKED}, + {ERRHRD, 161, NT_STATUS_OBJECT_PATH_INVALID}, + {ERRHRD, 170, NT_STATUS(0x80000011)}, + {ERRHRD, 182, NT_STATUS_ORDINAL_NOT_FOUND}, + {ERRHRD, 183, NT_STATUS_OBJECT_NAME_COLLISION}, + {ERRHRD, 193, NT_STATUS_BAD_INITIAL_PC}, + {ERRHRD, 203, NT_STATUS(0xc0000100)}, + {ERRHRD, 206, NT_STATUS_NAME_TOO_LONG}, + {ERRHRD, 230, NT_STATUS_INVALID_INFO_CLASS}, + {ERRHRD, 231, NT_STATUS_INSTANCE_NOT_AVAILABLE}, + {ERRHRD, 232, NT_STATUS_PIPE_CLOSING}, + {ERRHRD, 233, NT_STATUS_PIPE_DISCONNECTED}, + {ERRHRD, 234, STATUS_MORE_ENTRIES}, + {ERRHRD, 240, NT_STATUS_VIRTUAL_CIRCUIT_CLOSED}, + {ERRHRD, 254, NT_STATUS(0x80000013)}, + {ERRHRD, 255, NT_STATUS_EA_TOO_LARGE}, + {ERRHRD, 259, NT_STATUS_GUIDS_EXHAUSTED}, + {ERRHRD, 267, NT_STATUS_NOT_A_DIRECTORY}, + {ERRHRD, 275, NT_STATUS_EA_TOO_LARGE}, + {ERRHRD, 276, NT_STATUS_NONEXISTENT_EA_ENTRY}, + {ERRHRD, 277, NT_STATUS_NONEXISTENT_EA_ENTRY}, + {ERRHRD, 278, NT_STATUS_NONEXISTENT_EA_ENTRY}, + {ERRHRD, 282, NT_STATUS_EAS_NOT_SUPPORTED}, + {ERRHRD, 288, NT_STATUS_MUTANT_NOT_OWNED}, + {ERRHRD, 298, NT_STATUS_SEMAPHORE_LIMIT_EXCEEDED}, + {ERRHRD, 299, NT_STATUS(0x8000000d)}, + {ERRHRD, 300, NT_STATUS_OPLOCK_NOT_GRANTED}, + {ERRHRD, 301, NT_STATUS_INVALID_OPLOCK_PROTOCOL}, + {ERRHRD, 487, NT_STATUS_CONFLICTING_ADDRESSES}, + {ERRHRD, 534, NT_STATUS_INTEGER_OVERFLOW}, + {ERRHRD, 535, NT_STATUS_PIPE_CONNECTED}, + {ERRHRD, 536, NT_STATUS_PIPE_LISTENING}, + {ERRHRD, 995, NT_STATUS_CANCELLED}, + {ERRHRD, 997, NT_STATUS(0x00000103)}, + {ERRHRD, 998, NT_STATUS_ACCESS_VIOLATION}, + {ERRHRD, 999, NT_STATUS_IN_PAGE_ERROR}, + {ERRHRD, 1001, NT_STATUS_BAD_INITIAL_STACK}, + {ERRHRD, 1005, NT_STATUS_UNRECOGNIZED_VOLUME}, + {ERRHRD, 1006, NT_STATUS_FILE_INVALID}, + {ERRHRD, 1007, NT_STATUS_FULLSCREEN_MODE}, + {ERRHRD, 1008, NT_STATUS_NO_TOKEN}, + {ERRHRD, 1009, NT_STATUS_REGISTRY_CORRUPT}, + {ERRHRD, 1016, NT_STATUS_REGISTRY_IO_FAILED}, + {ERRHRD, 1017, NT_STATUS_NOT_REGISTRY_FILE}, + {ERRHRD, 1018, NT_STATUS_KEY_DELETED}, + {ERRHRD, 1019, NT_STATUS_NO_LOG_SPACE}, + {ERRHRD, 1020, NT_STATUS_KEY_HAS_CHILDREN}, + {ERRHRD, 1021, NT_STATUS_CHILD_MUST_BE_VOLATILE}, + {ERRHRD, 1022, NT_STATUS(0x0000010c)}, +}; + + +/***************************************************************************** +convert a dos eclas/ecode to a NT status32 code + *****************************************************************************/ +NTSTATUS dos_to_ntstatus(int eclass, int ecode) +{ + int i; + for (i=0; NT_STATUS_V(dos_to_ntstatus_map[i].ntstatus); i++) { + if (eclass == dos_to_ntstatus_map[i].dos_class && + ecode == dos_to_ntstatus_map[i].dos_code) { + return dos_to_ntstatus_map[i].ntstatus; + } + } + return NT_STATUS_UNSUCCESSFUL; +} + + +/***************************************************************************** +convert a NT status code to a dos class/code + *****************************************************************************/ +void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode) +{ + int i; + for (i=0; NT_STATUS_V(ntstatus_to_dos_map[i].ntstatus); i++) { + if (NT_STATUS_V(ntstatus) == + NT_STATUS_V(ntstatus_to_dos_map[i].ntstatus)) { + *eclass = ntstatus_to_dos_map[i].dos_class; + *ecode = ntstatus_to_dos_map[i].dos_code; + return; + } + } + *eclass = ERRSRV; + *ecode = ERRerror; +} -- cgit From b031af348c7dcc8c74bf49945211c466b8eca079 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 27 Aug 2001 19:46:22 +0000 Subject: converted another bunch of stuff to NTSTATUS (This used to be commit 1d36250e338ae0ff9fbbf86019809205dd97d05e) --- source3/libsmb/errormap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 92a4b19847..a8baf025af 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -574,7 +574,7 @@ static struct { {ERRDOS, ERRbadfile, NT_STATUS_NO_SUCH_FILE}, {ERRDOS, ERRbadpath, NT_STATUS_OBJECT_PATH_NOT_FOUND}, {ERRDOS, ERRnofids, NT_STATUS_TOO_MANY_OPENED_FILES}, - {ERRDOS, ERRnoaccess, NT_STATUS_INVALID_LOCK_SEQUENCE}, + {ERRDOS, ERRnoaccess, NT_STATUS_ACCESS_DENIED}, {ERRDOS, ERRbadfid, NT_STATUS_INVALID_HANDLE}, {ERRDOS, ERRnomem, NT_STATUS_INSUFFICIENT_RESOURCES}, {ERRDOS, ERRbadaccess, NT_STATUS_INVALID_LOCK_SEQUENCE}, -- cgit From 819f5ea0d5c6fe7d36b0f867e7f86ae6b54fd8b4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 1 Sep 2001 23:08:08 +0000 Subject: use a name not a number for ERRinsufficientbuffer (This used to be commit 8e70666fccde1025d77e4db51b5b63e5142d98ec) --- source3/libsmb/errormap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index a8baf025af..73bbde71eb 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -67,7 +67,7 @@ static struct { {ERRDOS, 193, NT_STATUS_INVALID_FILE_FOR_SECTION}, {ERRDOS, ERRbadaccess, NT_STATUS_ALREADY_COMMITTED}, {ERRDOS, ERRbadaccess, NT_STATUS_ACCESS_DENIED}, - {ERRDOS, 122, NT_STATUS_BUFFER_TOO_SMALL}, + {ERRDOS, ERRinsufficientbuffer, NT_STATUS_BUFFER_TOO_SMALL}, {ERRDOS, ERRbadfid, NT_STATUS_OBJECT_TYPE_MISMATCH}, {ERRDOS, 37, NT_STATUS_NONCONTINUABLE_EXCEPTION}, {ERRDOS, 38, NT_STATUS_INVALID_DISPOSITION}, -- cgit From fbc1f326f445a2826a10155fe0122c779bb1f80e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 3 Sep 2001 10:38:13 +0000 Subject: more NTSTATUS/WERROR conversion (This used to be commit ad648c5cd8ebe4be8304379117f403d7673dcbc8) --- source3/libsmb/errormap.c | 584 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 584 insertions(+) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 73bbde71eb..65dcdf4bdf 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -818,6 +818,547 @@ static struct { {ERRHRD, 1022, NT_STATUS(0x0000010c)}, }; +/* errmap NTSTATUS->Win32 */ +static struct { + NTSTATUS ntstatus; + WERROR werror; +} ntstatus_to_werror_map[] = { + {NT_STATUS(0x103), W_ERROR(0x3e5)}, + {NT_STATUS(0x105), W_ERROR(0xea)}, + {NT_STATUS(0x106), W_ERROR(0x514)}, + {NT_STATUS(0x107), W_ERROR(0x515)}, + {NT_STATUS(0x10c), W_ERROR(0x3fe)}, + {NT_STATUS(0x10d), W_ERROR(0x516)}, + {NT_STATUS(0x121), W_ERROR(0x2009)}, + {NT_STATUS(0xc0000001), W_ERROR(0x1f)}, + {NT_STATUS(0xc0000002), W_ERROR(0x1)}, + {NT_STATUS(0xc0000003), W_ERROR(0x57)}, + {NT_STATUS(0xc0000004), W_ERROR(0x18)}, + {NT_STATUS(0xc0000005), W_ERROR(0x3e6)}, + {NT_STATUS(0xc0000006), W_ERROR(0x3e7)}, + {NT_STATUS(0xc0000007), W_ERROR(0x5ae)}, + {NT_STATUS(0xc0000008), W_ERROR(0x6)}, + {NT_STATUS(0xc0000009), W_ERROR(0x3e9)}, + {NT_STATUS(0xc000000a), W_ERROR(0xc1)}, + {NT_STATUS(0xc000000b), W_ERROR(0x57)}, + {NT_STATUS(0xc000000d), W_ERROR(0x57)}, + {NT_STATUS(0xc000000e), W_ERROR(0x2)}, + {NT_STATUS(0xc000000f), W_ERROR(0x2)}, + {NT_STATUS(0xc0000010), W_ERROR(0x1)}, + {NT_STATUS(0xc0000011), W_ERROR(0x26)}, + {NT_STATUS(0xc0000012), W_ERROR(0x22)}, + {NT_STATUS(0xc0000013), W_ERROR(0x15)}, + {NT_STATUS(0xc0000014), W_ERROR(0x6f9)}, + {NT_STATUS(0xc0000015), W_ERROR(0x1b)}, + {NT_STATUS(0xc0000016), W_ERROR(0xea)}, + {NT_STATUS(0xc0000017), W_ERROR(0x8)}, + {NT_STATUS(0xc0000018), W_ERROR(0x1e7)}, + {NT_STATUS(0xc0000019), W_ERROR(0x1e7)}, + {NT_STATUS(0xc000001a), W_ERROR(0x57)}, + {NT_STATUS(0xc000001b), W_ERROR(0x57)}, + {NT_STATUS(0xc000001c), W_ERROR(0x1)}, + {NT_STATUS(0xc000001d), W_ERROR(0xc000001d)}, + {NT_STATUS(0xc000001e), W_ERROR(0x5)}, + {NT_STATUS(0xc000001f), W_ERROR(0x5)}, + {NT_STATUS(0xc0000020), W_ERROR(0xc1)}, + {NT_STATUS(0xc0000021), W_ERROR(0x5)}, + {NT_STATUS(0xc0000022), W_ERROR(0x5)}, + {NT_STATUS(0xc0000023), W_ERROR(0x7a)}, + {NT_STATUS(0xc0000024), W_ERROR(0x6)}, + {NT_STATUS(0xc0000025), W_ERROR(0xc0000025)}, + {NT_STATUS(0xc0000026), W_ERROR(0xc0000026)}, + {NT_STATUS(0xc000002a), W_ERROR(0x9e)}, + {NT_STATUS(0xc000002b), W_ERROR(0xc000002b)}, + {NT_STATUS(0xc000002c), W_ERROR(0x1e7)}, + {NT_STATUS(0xc000002d), W_ERROR(0x1e7)}, + {NT_STATUS(0xc0000030), W_ERROR(0x57)}, + {NT_STATUS(0xc0000032), W_ERROR(0x571)}, + {NT_STATUS(0xc0000033), W_ERROR(0x7b)}, + {NT_STATUS(0xc0000034), W_ERROR(0x2)}, + {NT_STATUS(0xc0000035), W_ERROR(0xb7)}, + {NT_STATUS(0xc0000037), W_ERROR(0x6)}, + {NT_STATUS(0xc0000039), W_ERROR(0xa1)}, + {NT_STATUS(0xc000003a), W_ERROR(0x3)}, + {NT_STATUS(0xc000003b), W_ERROR(0xa1)}, + {NT_STATUS(0xc000003c), W_ERROR(0x45d)}, + {NT_STATUS(0xc000003d), W_ERROR(0x45d)}, + {NT_STATUS(0xc000003e), W_ERROR(0x17)}, + {NT_STATUS(0xc000003f), W_ERROR(0x17)}, + {NT_STATUS(0xc0000040), W_ERROR(0x8)}, + {NT_STATUS(0xc0000041), W_ERROR(0x5)}, + {NT_STATUS(0xc0000042), W_ERROR(0x6)}, + {NT_STATUS(0xc0000043), W_ERROR(0x20)}, + {NT_STATUS(0xc0000044), W_ERROR(0x718)}, + {NT_STATUS(0xc0000045), W_ERROR(0x57)}, + {NT_STATUS(0xc0000046), W_ERROR(0x120)}, + {NT_STATUS(0xc0000047), W_ERROR(0x12a)}, + {NT_STATUS(0xc0000048), W_ERROR(0x57)}, + {NT_STATUS(0xc0000049), W_ERROR(0x57)}, + {NT_STATUS(0xc000004a), W_ERROR(0x9c)}, + {NT_STATUS(0xc000004b), W_ERROR(0x5)}, + {NT_STATUS(0xc000004c), W_ERROR(0x57)}, + {NT_STATUS(0xc000004d), W_ERROR(0x57)}, + {NT_STATUS(0xc000004e), W_ERROR(0x57)}, + {NT_STATUS(0xc000004f), W_ERROR(0x11a)}, + {NT_STATUS(0xc0000050), W_ERROR(0xff)}, + {NT_STATUS(0xc0000051), W_ERROR(0x570)}, + {NT_STATUS(0xc0000052), W_ERROR(0x570)}, + {NT_STATUS(0xc0000053), W_ERROR(0x570)}, + {NT_STATUS(0xc0000054), W_ERROR(0x21)}, + {NT_STATUS(0xc0000055), W_ERROR(0x21)}, + {NT_STATUS(0xc0000056), W_ERROR(0x5)}, + {NT_STATUS(0xc0000057), W_ERROR(0x32)}, + {NT_STATUS(0xc0000058), W_ERROR(0x519)}, + {NT_STATUS(0xc0000059), W_ERROR(0x51a)}, + {NT_STATUS(0xc000005a), W_ERROR(0x51b)}, + {NT_STATUS(0xc000005b), W_ERROR(0x51c)}, + {NT_STATUS(0xc000005c), W_ERROR(0x51d)}, + {NT_STATUS(0xc000005d), W_ERROR(0x51e)}, + {NT_STATUS(0xc000005e), W_ERROR(0x51f)}, + {NT_STATUS(0xc000005f), W_ERROR(0x520)}, + {NT_STATUS(0xc0000060), W_ERROR(0x521)}, + {NT_STATUS(0xc0000061), W_ERROR(0x522)}, + {NT_STATUS(0xc0000062), W_ERROR(0x523)}, + {NT_STATUS(0xc0000063), W_ERROR(0x524)}, + {NT_STATUS(0xc0000064), W_ERROR(0x525)}, + {NT_STATUS(0xc0000065), W_ERROR(0x526)}, + {NT_STATUS(0xc0000066), W_ERROR(0x527)}, + {NT_STATUS(0xc0000067), W_ERROR(0x528)}, + {NT_STATUS(0xc0000068), W_ERROR(0x529)}, + {NT_STATUS(0xc0000069), W_ERROR(0x52a)}, + {NT_STATUS(0xc000006a), W_ERROR(0x56)}, + {NT_STATUS(0xc000006b), W_ERROR(0x52c)}, + {NT_STATUS(0xc000006c), W_ERROR(0x52d)}, + {NT_STATUS(0xc000006d), W_ERROR(0x52e)}, + {NT_STATUS(0xc000006e), W_ERROR(0x52f)}, + {NT_STATUS(0xc000006f), W_ERROR(0x530)}, + {NT_STATUS(0xc0000070), W_ERROR(0x531)}, + {NT_STATUS(0xc0000071), W_ERROR(0x532)}, + {NT_STATUS(0xc0000072), W_ERROR(0x533)}, + {NT_STATUS(0xc0000073), W_ERROR(0x534)}, + {NT_STATUS(0xc0000074), W_ERROR(0x535)}, + {NT_STATUS(0xc0000075), W_ERROR(0x536)}, + {NT_STATUS(0xc0000076), W_ERROR(0x537)}, + {NT_STATUS(0xc0000077), W_ERROR(0x538)}, + {NT_STATUS(0xc0000078), W_ERROR(0x539)}, + {NT_STATUS(0xc0000079), W_ERROR(0x53a)}, + {NT_STATUS(0xc000007a), W_ERROR(0x7f)}, + {NT_STATUS(0xc000007b), W_ERROR(0xc1)}, + {NT_STATUS(0xc000007c), W_ERROR(0x3f0)}, + {NT_STATUS(0xc000007d), W_ERROR(0x53c)}, + {NT_STATUS(0xc000007e), W_ERROR(0x9e)}, + {NT_STATUS(0xc000007f), W_ERROR(0x70)}, + {NT_STATUS(0xc0000080), W_ERROR(0x53d)}, + {NT_STATUS(0xc0000081), W_ERROR(0x53e)}, + {NT_STATUS(0xc0000082), W_ERROR(0x44)}, + {NT_STATUS(0xc0000083), W_ERROR(0x103)}, + {NT_STATUS(0xc0000084), W_ERROR(0x53f)}, + {NT_STATUS(0xc0000085), W_ERROR(0x103)}, + {NT_STATUS(0xc0000086), W_ERROR(0x9a)}, + {NT_STATUS(0xc0000087), W_ERROR(0xe)}, + {NT_STATUS(0xc0000088), W_ERROR(0x1e7)}, + {NT_STATUS(0xc0000089), W_ERROR(0x714)}, + {NT_STATUS(0xc000008a), W_ERROR(0x715)}, + {NT_STATUS(0xc000008b), W_ERROR(0x716)}, + {NT_STATUS(0xc000008c), W_ERROR(0xc000008c)}, + {NT_STATUS(0xc000008d), W_ERROR(0xc000008d)}, + {NT_STATUS(0xc000008e), W_ERROR(0xc000008e)}, + {NT_STATUS(0xc000008f), W_ERROR(0xc000008f)}, + {NT_STATUS(0xc0000090), W_ERROR(0xc0000090)}, + {NT_STATUS(0xc0000091), W_ERROR(0xc0000091)}, + {NT_STATUS(0xc0000092), W_ERROR(0xc0000092)}, + {NT_STATUS(0xc0000093), W_ERROR(0xc0000093)}, + {NT_STATUS(0xc0000094), W_ERROR(0xc0000094)}, + {NT_STATUS(0xc0000095), W_ERROR(0x216)}, + {NT_STATUS(0xc0000096), W_ERROR(0xc0000096)}, + {NT_STATUS(0xc0000097), W_ERROR(0x8)}, + {NT_STATUS(0xc0000098), W_ERROR(0x3ee)}, + {NT_STATUS(0xc0000099), W_ERROR(0x540)}, + {NT_STATUS(0xc000009a), W_ERROR(0x5aa)}, + {NT_STATUS(0xc000009b), W_ERROR(0x3)}, + {NT_STATUS(0xc000009c), W_ERROR(0x17)}, + {NT_STATUS(0xc000009d), W_ERROR(0x48f)}, + {NT_STATUS(0xc000009e), W_ERROR(0x15)}, + {NT_STATUS(0xc000009f), W_ERROR(0x1e7)}, + {NT_STATUS(0xc00000a0), W_ERROR(0x1e7)}, + {NT_STATUS(0xc00000a1), W_ERROR(0x5ad)}, + {NT_STATUS(0xc00000a2), W_ERROR(0x13)}, + {NT_STATUS(0xc00000a3), W_ERROR(0x15)}, + {NT_STATUS(0xc00000a4), W_ERROR(0x541)}, + {NT_STATUS(0xc00000a5), W_ERROR(0x542)}, + {NT_STATUS(0xc00000a6), W_ERROR(0x543)}, + {NT_STATUS(0xc00000a7), W_ERROR(0x544)}, + {NT_STATUS(0xc00000a8), W_ERROR(0x545)}, + {NT_STATUS(0xc00000a9), W_ERROR(0x57)}, + {NT_STATUS(0xc00000ab), W_ERROR(0xe7)}, + {NT_STATUS(0xc00000ac), W_ERROR(0xe7)}, + {NT_STATUS(0xc00000ad), W_ERROR(0xe6)}, + {NT_STATUS(0xc00000ae), W_ERROR(0xe7)}, + {NT_STATUS(0xc00000af), W_ERROR(0x1)}, + {NT_STATUS(0xc00000b0), W_ERROR(0xe9)}, + {NT_STATUS(0xc00000b1), W_ERROR(0xe8)}, + {NT_STATUS(0xc00000b2), W_ERROR(0x217)}, + {NT_STATUS(0xc00000b3), W_ERROR(0x218)}, + {NT_STATUS(0xc00000b4), W_ERROR(0xe6)}, + {NT_STATUS(0xc00000b5), W_ERROR(0x79)}, + {NT_STATUS(0xc00000b6), W_ERROR(0x26)}, + {NT_STATUS(0xc00000ba), W_ERROR(0x5)}, + {NT_STATUS(0xc00000bb), W_ERROR(0x32)}, + {NT_STATUS(0xc00000bc), W_ERROR(0x33)}, + {NT_STATUS(0xc00000bd), W_ERROR(0x34)}, + {NT_STATUS(0xc00000be), W_ERROR(0x35)}, + {NT_STATUS(0xc00000bf), W_ERROR(0x36)}, + {NT_STATUS(0xc00000c0), W_ERROR(0x37)}, + {NT_STATUS(0xc00000c1), W_ERROR(0x38)}, + {NT_STATUS(0xc00000c2), W_ERROR(0x39)}, + {NT_STATUS(0xc00000c3), W_ERROR(0x3a)}, + {NT_STATUS(0xc00000c4), W_ERROR(0x3b)}, + {NT_STATUS(0xc00000c5), W_ERROR(0x3c)}, + {NT_STATUS(0xc00000c6), W_ERROR(0x3d)}, + {NT_STATUS(0xc00000c7), W_ERROR(0x3e)}, + {NT_STATUS(0xc00000c8), W_ERROR(0x3f)}, + {NT_STATUS(0xc00000c9), W_ERROR(0x40)}, + {NT_STATUS(0xc00000ca), W_ERROR(0x41)}, + {NT_STATUS(0xc00000cb), W_ERROR(0x42)}, + {NT_STATUS(0xc00000cc), W_ERROR(0x43)}, + {NT_STATUS(0xc00000cd), W_ERROR(0x44)}, + {NT_STATUS(0xc00000ce), W_ERROR(0x45)}, + {NT_STATUS(0xc00000cf), W_ERROR(0x46)}, + {NT_STATUS(0xc00000d0), W_ERROR(0x47)}, + {NT_STATUS(0xc00000d1), W_ERROR(0x48)}, + {NT_STATUS(0xc00000d2), W_ERROR(0x58)}, + {NT_STATUS(0xc00000d4), W_ERROR(0x11)}, + {NT_STATUS(0xc00000d5), W_ERROR(0x5)}, + {NT_STATUS(0xc00000d6), W_ERROR(0xf0)}, + {NT_STATUS(0xc00000d7), W_ERROR(0x546)}, + {NT_STATUS(0xc00000d9), W_ERROR(0xe8)}, + {NT_STATUS(0xc00000da), W_ERROR(0x547)}, + {NT_STATUS(0xc00000dc), W_ERROR(0x548)}, + {NT_STATUS(0xc00000dd), W_ERROR(0x549)}, + {NT_STATUS(0xc00000de), W_ERROR(0x54a)}, + {NT_STATUS(0xc00000df), W_ERROR(0x54b)}, + {NT_STATUS(0xc00000e0), W_ERROR(0x54c)}, + {NT_STATUS(0xc00000e1), W_ERROR(0x54d)}, + {NT_STATUS(0xc00000e2), W_ERROR(0x12c)}, + {NT_STATUS(0xc00000e3), W_ERROR(0x12d)}, + {NT_STATUS(0xc00000e4), W_ERROR(0x54e)}, + {NT_STATUS(0xc00000e5), W_ERROR(0x54f)}, + {NT_STATUS(0xc00000e6), W_ERROR(0x550)}, + {NT_STATUS(0xc00000e7), W_ERROR(0x551)}, + {NT_STATUS(0xc00000e8), W_ERROR(0x6f8)}, + {NT_STATUS(0xc00000ed), W_ERROR(0x552)}, + {NT_STATUS(0xc00000ee), W_ERROR(0x553)}, + {NT_STATUS(0xc00000ef), W_ERROR(0x57)}, + {NT_STATUS(0xc00000f0), W_ERROR(0x57)}, + {NT_STATUS(0xc00000f1), W_ERROR(0x57)}, + {NT_STATUS(0xc00000f2), W_ERROR(0x57)}, + {NT_STATUS(0xc00000f3), W_ERROR(0x57)}, + {NT_STATUS(0xc00000f4), W_ERROR(0x57)}, + {NT_STATUS(0xc00000f5), W_ERROR(0x57)}, + {NT_STATUS(0xc00000f6), W_ERROR(0x57)}, + {NT_STATUS(0xc00000f7), W_ERROR(0x57)}, + {NT_STATUS(0xc00000f8), W_ERROR(0x57)}, + {NT_STATUS(0xc00000f9), W_ERROR(0x57)}, + {NT_STATUS(0xc00000fa), W_ERROR(0x57)}, + {NT_STATUS(0xc00000fb), W_ERROR(0x3)}, + {NT_STATUS(0xc00000fd), W_ERROR(0x3e9)}, + {NT_STATUS(0xc00000fe), W_ERROR(0x554)}, + {NT_STATUS(0xc0000100), W_ERROR(0xcb)}, + {NT_STATUS(0xc0000101), W_ERROR(0x91)}, + {NT_STATUS(0xc0000102), W_ERROR(0x570)}, + {NT_STATUS(0xc0000103), W_ERROR(0x10b)}, + {NT_STATUS(0xc0000104), W_ERROR(0x555)}, + {NT_STATUS(0xc0000105), W_ERROR(0x556)}, + {NT_STATUS(0xc0000106), W_ERROR(0xce)}, + {NT_STATUS(0xc0000107), W_ERROR(0x961)}, + {NT_STATUS(0xc0000108), W_ERROR(0x964)}, + {NT_STATUS(0xc000010a), W_ERROR(0x5)}, + {NT_STATUS(0xc000010b), W_ERROR(0x557)}, + {NT_STATUS(0xc000010d), W_ERROR(0x558)}, + {NT_STATUS(0xc000010e), W_ERROR(0x420)}, + {NT_STATUS(0xc0000117), W_ERROR(0x5a4)}, + {NT_STATUS(0xc000011b), W_ERROR(0xc1)}, + {NT_STATUS(0xc000011c), W_ERROR(0x559)}, + {NT_STATUS(0xc000011d), W_ERROR(0x55a)}, + {NT_STATUS(0xc000011e), W_ERROR(0x3ee)}, + {NT_STATUS(0xc000011f), W_ERROR(0x4)}, + {NT_STATUS(0xc0000120), W_ERROR(0x3e3)}, + {NT_STATUS(0xc0000121), W_ERROR(0x5)}, + {NT_STATUS(0xc0000122), W_ERROR(0x4ba)}, + {NT_STATUS(0xc0000123), W_ERROR(0x5)}, + {NT_STATUS(0xc0000124), W_ERROR(0x55b)}, + {NT_STATUS(0xc0000125), W_ERROR(0x55c)}, + {NT_STATUS(0xc0000126), W_ERROR(0x55d)}, + {NT_STATUS(0xc0000127), W_ERROR(0x55e)}, + {NT_STATUS(0xc0000128), W_ERROR(0x6)}, + {NT_STATUS(0xc000012b), W_ERROR(0x55f)}, + {NT_STATUS(0xc000012d), W_ERROR(0x5af)}, + {NT_STATUS(0xc000012e), W_ERROR(0xc1)}, + {NT_STATUS(0xc000012f), W_ERROR(0xc1)}, + {NT_STATUS(0xc0000130), W_ERROR(0xc1)}, + {NT_STATUS(0xc0000131), W_ERROR(0xc1)}, + {NT_STATUS(0xc0000133), W_ERROR(0x576)}, + {NT_STATUS(0xc0000135), W_ERROR(0x7e)}, + {NT_STATUS(0xc0000138), W_ERROR(0xb6)}, + {NT_STATUS(0xc0000139), W_ERROR(0x7f)}, + {NT_STATUS(0xc000013b), W_ERROR(0x40)}, + {NT_STATUS(0xc000013c), W_ERROR(0x40)}, + {NT_STATUS(0xc000013d), W_ERROR(0x33)}, + {NT_STATUS(0xc000013e), W_ERROR(0x3b)}, + {NT_STATUS(0xc000013f), W_ERROR(0x3b)}, + {NT_STATUS(0xc0000140), W_ERROR(0x3b)}, + {NT_STATUS(0xc0000141), W_ERROR(0x3b)}, + {NT_STATUS(0xc0000142), W_ERROR(0x45a)}, + {NT_STATUS(0xc0000148), W_ERROR(0x7c)}, + {NT_STATUS(0xc0000149), W_ERROR(0x56)}, + {NT_STATUS(0xc000014b), W_ERROR(0x6d)}, + {NT_STATUS(0xc000014c), W_ERROR(0x3f1)}, + {NT_STATUS(0xc000014d), W_ERROR(0x3f8)}, + {NT_STATUS(0xc000014f), W_ERROR(0x3ed)}, + {NT_STATUS(0xc0000150), W_ERROR(0x45e)}, + {NT_STATUS(0xc0000151), W_ERROR(0x560)}, + {NT_STATUS(0xc0000152), W_ERROR(0x561)}, + {NT_STATUS(0xc0000153), W_ERROR(0x562)}, + {NT_STATUS(0xc0000154), W_ERROR(0x563)}, + {NT_STATUS(0xc0000155), W_ERROR(0x564)}, + {NT_STATUS(0xc0000156), W_ERROR(0x565)}, + {NT_STATUS(0xc0000157), W_ERROR(0x566)}, + {NT_STATUS(0xc0000158), W_ERROR(0x567)}, + {NT_STATUS(0xc0000159), W_ERROR(0x3ef)}, + {NT_STATUS(0xc000015a), W_ERROR(0x568)}, + {NT_STATUS(0xc000015b), W_ERROR(0x569)}, + {NT_STATUS(0xc000015c), W_ERROR(0x3f9)}, + {NT_STATUS(0xc000015d), W_ERROR(0x56a)}, + {NT_STATUS(0xc000015f), W_ERROR(0x45d)}, + {NT_STATUS(0xc0000162), W_ERROR(0x459)}, + {NT_STATUS(0xc0000165), W_ERROR(0x462)}, + {NT_STATUS(0xc0000166), W_ERROR(0x463)}, + {NT_STATUS(0xc0000167), W_ERROR(0x464)}, + {NT_STATUS(0xc0000168), W_ERROR(0x465)}, + {NT_STATUS(0xc0000169), W_ERROR(0x466)}, + {NT_STATUS(0xc000016a), W_ERROR(0x467)}, + {NT_STATUS(0xc000016b), W_ERROR(0x468)}, + {NT_STATUS(0xc000016c), W_ERROR(0x45f)}, + {NT_STATUS(0xc000016d), W_ERROR(0x45d)}, + {NT_STATUS(0xc0000172), W_ERROR(0x451)}, + {NT_STATUS(0xc0000173), W_ERROR(0x452)}, + {NT_STATUS(0xc0000174), W_ERROR(0x453)}, + {NT_STATUS(0xc0000175), W_ERROR(0x454)}, + {NT_STATUS(0xc0000176), W_ERROR(0x455)}, + {NT_STATUS(0xc0000177), W_ERROR(0x469)}, + {NT_STATUS(0xc0000178), W_ERROR(0x458)}, + {NT_STATUS(0xc000017a), W_ERROR(0x56b)}, + {NT_STATUS(0xc000017b), W_ERROR(0x56c)}, + {NT_STATUS(0xc000017c), W_ERROR(0x3fa)}, + {NT_STATUS(0xc000017d), W_ERROR(0x3fb)}, + {NT_STATUS(0xc000017e), W_ERROR(0x56d)}, + {NT_STATUS(0xc000017f), W_ERROR(0x56e)}, + {NT_STATUS(0xc0000180), W_ERROR(0x3fc)}, + {NT_STATUS(0xc0000181), W_ERROR(0x3fd)}, + {NT_STATUS(0xc0000182), W_ERROR(0x57)}, + {NT_STATUS(0xc0000183), W_ERROR(0x45d)}, + {NT_STATUS(0xc0000184), W_ERROR(0x16)}, + {NT_STATUS(0xc0000185), W_ERROR(0x45d)}, + {NT_STATUS(0xc0000186), W_ERROR(0x45d)}, + {NT_STATUS(0xc0000188), W_ERROR(0x5de)}, + {NT_STATUS(0xc0000189), W_ERROR(0x13)}, + {NT_STATUS(0xc000018a), W_ERROR(0x6fa)}, + {NT_STATUS(0xc000018b), W_ERROR(0x6fb)}, + {NT_STATUS(0xc000018c), W_ERROR(0x6fc)}, + {NT_STATUS(0xc000018d), W_ERROR(0x6fd)}, + {NT_STATUS(0xc000018e), W_ERROR(0x5dc)}, + {NT_STATUS(0xc000018f), W_ERROR(0x5dd)}, + {NT_STATUS(0xc0000190), W_ERROR(0x6fe)}, + {NT_STATUS(0xc0000192), W_ERROR(0x700)}, + {NT_STATUS(0xc0000193), W_ERROR(0x701)}, + {NT_STATUS(0xc0000194), W_ERROR(0x46b)}, + {NT_STATUS(0xc0000195), W_ERROR(0x4c3)}, + {NT_STATUS(0xc0000196), W_ERROR(0x4c4)}, + {NT_STATUS(0xc0000197), W_ERROR(0x5df)}, + {NT_STATUS(0xc0000198), W_ERROR(0x70f)}, + {NT_STATUS(0xc0000199), W_ERROR(0x710)}, + {NT_STATUS(0xc000019a), W_ERROR(0x711)}, + {NT_STATUS(0xc000019b), W_ERROR(0x712)}, + {NT_STATUS(0xc0000202), W_ERROR(0x572)}, + {NT_STATUS(0xc0000203), W_ERROR(0x3b)}, + {NT_STATUS(0xc0000204), W_ERROR(0x717)}, + {NT_STATUS(0xc0000205), W_ERROR(0x46a)}, + {NT_STATUS(0xc0000206), W_ERROR(0x6f8)}, + {NT_STATUS(0xc0000207), W_ERROR(0x4be)}, + {NT_STATUS(0xc0000208), W_ERROR(0x4be)}, + {NT_STATUS(0xc0000209), W_ERROR(0x44)}, + {NT_STATUS(0xc000020a), W_ERROR(0x34)}, + {NT_STATUS(0xc000020b), W_ERROR(0x40)}, + {NT_STATUS(0xc000020c), W_ERROR(0x40)}, + {NT_STATUS(0xc000020d), W_ERROR(0x40)}, + {NT_STATUS(0xc000020e), W_ERROR(0x44)}, + {NT_STATUS(0xc000020f), W_ERROR(0x3b)}, + {NT_STATUS(0xc0000210), W_ERROR(0x3b)}, + {NT_STATUS(0xc0000211), W_ERROR(0x3b)}, + {NT_STATUS(0xc0000212), W_ERROR(0x3b)}, + {NT_STATUS(0xc0000213), W_ERROR(0x3b)}, + {NT_STATUS(0xc0000214), W_ERROR(0x3b)}, + {NT_STATUS(0xc0000215), W_ERROR(0x3b)}, + {NT_STATUS(0xc0000216), W_ERROR(0x32)}, + {NT_STATUS(0xc0000217), W_ERROR(0x32)}, + {NT_STATUS(0xc000021c), W_ERROR(0x17e6)}, + {NT_STATUS(0xc0000220), W_ERROR(0x46c)}, + {NT_STATUS(0xc0000221), W_ERROR(0xc1)}, + {NT_STATUS(0xc0000224), W_ERROR(0x773)}, + {NT_STATUS(0xc0000225), W_ERROR(0x490)}, + {NT_STATUS(0xc000022a), W_ERROR(0xc000022a)}, + {NT_STATUS(0xc000022b), W_ERROR(0xc000022b)}, + {NT_STATUS(0xc000022d), W_ERROR(0x4d5)}, + {NT_STATUS(0xc0000230), W_ERROR(0x492)}, + {NT_STATUS(0xc0000233), W_ERROR(0x774)}, + {NT_STATUS(0xc0000234), W_ERROR(0x775)}, + {NT_STATUS(0xc0000235), W_ERROR(0x6)}, + {NT_STATUS(0xc0000236), W_ERROR(0x4c9)}, + {NT_STATUS(0xc0000237), W_ERROR(0x4ca)}, + {NT_STATUS(0xc0000238), W_ERROR(0x4cb)}, + {NT_STATUS(0xc0000239), W_ERROR(0x4cc)}, + {NT_STATUS(0xc000023a), W_ERROR(0x4cd)}, + {NT_STATUS(0xc000023b), W_ERROR(0x4ce)}, + {NT_STATUS(0xc000023c), W_ERROR(0x4cf)}, + {NT_STATUS(0xc000023d), W_ERROR(0x4d0)}, + {NT_STATUS(0xc000023e), W_ERROR(0x4d1)}, + {NT_STATUS(0xc000023f), W_ERROR(0x4d2)}, + {NT_STATUS(0xc0000240), W_ERROR(0x4d3)}, + {NT_STATUS(0xc0000241), W_ERROR(0x4d4)}, + {NT_STATUS(0xc0000243), W_ERROR(0x4c8)}, + {NT_STATUS(0xc0000246), W_ERROR(0x4d6)}, + {NT_STATUS(0xc0000247), W_ERROR(0x4d7)}, + {NT_STATUS(0xc0000248), W_ERROR(0x4d8)}, + {NT_STATUS(0xc0000249), W_ERROR(0xc1)}, + {NT_STATUS(0xc0000253), W_ERROR(0x54f)}, + {NT_STATUS(0xc0000257), W_ERROR(0x4d0)}, + {NT_STATUS(0xc0000259), W_ERROR(0x573)}, + {NT_STATUS(0xc000025e), W_ERROR(0x422)}, + {NT_STATUS(0xc0000262), W_ERROR(0xb6)}, + {NT_STATUS(0xc0000263), W_ERROR(0x7f)}, + {NT_STATUS(0xc0000264), W_ERROR(0x120)}, + {NT_STATUS(0xc0000265), W_ERROR(0x476)}, + {NT_STATUS(0xc0000267), W_ERROR(0x10fe)}, + {NT_STATUS(0xc000026c), W_ERROR(0x7d1)}, + {NT_STATUS(0xc000026d), W_ERROR(0x4b1)}, + {NT_STATUS(0xc000026e), W_ERROR(0x15)}, + {NT_STATUS(0xc0000272), W_ERROR(0x491)}, + {NT_STATUS(0xc0000275), W_ERROR(0x1126)}, + {NT_STATUS(0xc0000276), W_ERROR(0x1129)}, + {NT_STATUS(0xc0000277), W_ERROR(0x112a)}, + {NT_STATUS(0xc0000278), W_ERROR(0x1128)}, + {NT_STATUS(0xc0000279), W_ERROR(0x780)}, + {NT_STATUS(0xc0000280), W_ERROR(0x781)}, + {NT_STATUS(0xc0000281), W_ERROR(0xa1)}, + {NT_STATUS(0xc0000283), W_ERROR(0x488)}, + {NT_STATUS(0xc0000284), W_ERROR(0x489)}, + {NT_STATUS(0xc0000285), W_ERROR(0x48a)}, + {NT_STATUS(0xc0000286), W_ERROR(0x48b)}, + {NT_STATUS(0xc0000287), W_ERROR(0x48c)}, + {NT_STATUS(0xc000028a), W_ERROR(0x5)}, + {NT_STATUS(0xc000028b), W_ERROR(0x5)}, + {NT_STATUS(0xc000028d), W_ERROR(0x5)}, + {NT_STATUS(0xc000028e), W_ERROR(0x5)}, + {NT_STATUS(0xc000028f), W_ERROR(0x5)}, + {NT_STATUS(0xc0000290), W_ERROR(0x5)}, + {NT_STATUS(0xc0000291), W_ERROR(0x1777)}, + {NT_STATUS(0xc0000292), W_ERROR(0x1778)}, + {NT_STATUS(0xc0000293), W_ERROR(0x1772)}, + {NT_STATUS(0xc0000295), W_ERROR(0x1068)}, + {NT_STATUS(0xc0000296), W_ERROR(0x1069)}, + {NT_STATUS(0xc0000297), W_ERROR(0x106a)}, + {NT_STATUS(0xc0000298), W_ERROR(0x106b)}, + {NT_STATUS(0xc0000299), W_ERROR(0x201a)}, + {NT_STATUS(0xc000029a), W_ERROR(0x201b)}, + {NT_STATUS(0xc000029b), W_ERROR(0x201c)}, + {NT_STATUS(0xc000029c), W_ERROR(0x1)}, + {NT_STATUS(0xc000029d), W_ERROR(0x10ff)}, + {NT_STATUS(0xc000029e), W_ERROR(0x1100)}, + {NT_STATUS(0xc000029f), W_ERROR(0x494)}, + {NT_STATUS(0xc00002a1), W_ERROR(0x200a)}, + {NT_STATUS(0xc00002a2), W_ERROR(0x200b)}, + {NT_STATUS(0xc00002a3), W_ERROR(0x200c)}, + {NT_STATUS(0xc00002a4), W_ERROR(0x200d)}, + {NT_STATUS(0xc00002a5), W_ERROR(0x200e)}, + {NT_STATUS(0xc00002a6), W_ERROR(0x200f)}, + {NT_STATUS(0xc00002a7), W_ERROR(0x2010)}, + {NT_STATUS(0xc00002a8), W_ERROR(0x2011)}, + {NT_STATUS(0xc00002a9), W_ERROR(0x2012)}, + {NT_STATUS(0xc00002aa), W_ERROR(0x2013)}, + {NT_STATUS(0xc00002ab), W_ERROR(0x2014)}, + {NT_STATUS(0xc00002ac), W_ERROR(0x2015)}, + {NT_STATUS(0xc00002ad), W_ERROR(0x2016)}, + {NT_STATUS(0xc00002ae), W_ERROR(0x2017)}, + {NT_STATUS(0xc00002af), W_ERROR(0x2018)}, + {NT_STATUS(0xc00002b0), W_ERROR(0x2019)}, + {NT_STATUS(0xc00002b1), W_ERROR(0x211e)}, + {NT_STATUS(0xc00002b2), W_ERROR(0x1127)}, + {NT_STATUS(0xc00002b6), W_ERROR(0x651)}, + {NT_STATUS(0xc00002b7), W_ERROR(0x49a)}, + {NT_STATUS(0xc00002b8), W_ERROR(0x49b)}, + {NT_STATUS(0xc00002c1), W_ERROR(0x2024)}, + {NT_STATUS(0xc00002c3), W_ERROR(0x575)}, + {NT_STATUS(0xc00002c5), W_ERROR(0x3e6)}, + {NT_STATUS(0xc00002c6), W_ERROR(0x1075)}, + {NT_STATUS(0xc00002c7), W_ERROR(0x1076)}, + {NT_STATUS(0xc00002ca), W_ERROR(0x10e8)}, + {NT_STATUS(0xc00002cb), W_ERROR(0x2138)}, + {NT_STATUS(0xc00002cc), W_ERROR(0x4e3)}, + {NT_STATUS(0xc00002cd), W_ERROR(0x2139)}, + {NT_STATUS(0xc00002cf), W_ERROR(0x49d)}, + {NT_STATUS(0xc00002d0), W_ERROR(0x213a)}, + {NT_STATUS(0xc00002d4), W_ERROR(0x2141)}, + {NT_STATUS(0xc00002d5), W_ERROR(0x2142)}, + {NT_STATUS(0xc00002d6), W_ERROR(0x2143)}, + {NT_STATUS(0xc00002d7), W_ERROR(0x2144)}, + {NT_STATUS(0xc00002d8), W_ERROR(0x2145)}, + {NT_STATUS(0xc00002d9), W_ERROR(0x2146)}, + {NT_STATUS(0xc00002da), W_ERROR(0x2147)}, + {NT_STATUS(0xc00002db), W_ERROR(0x2148)}, + {NT_STATUS(0xc00002dc), W_ERROR(0x2149)}, + {NT_STATUS(0xc00002dd), W_ERROR(0x32)}, + {NT_STATUS(0xc00002df), W_ERROR(0x2151)}, + {NT_STATUS(0xc00002e0), W_ERROR(0x2152)}, + {NT_STATUS(0xc00002e1), W_ERROR(0x2153)}, + {NT_STATUS(0xc00002e2), W_ERROR(0x2154)}, + {NT_STATUS(0xc00002e3), W_ERROR(0x215d)}, + {NT_STATUS(0xc00002e4), W_ERROR(0x2163)}, + {NT_STATUS(0xc00002e5), W_ERROR(0x2164)}, + {NT_STATUS(0xc00002e6), W_ERROR(0x2165)}, + {NT_STATUS(0xc00002e7), W_ERROR(0x216d)}, + {NT_STATUS(0xc00002fe), W_ERROR(0x45b)}, + {NT_STATUS(0xc00002ff), W_ERROR(0x4e7)}, + {NT_STATUS(0xc0000300), W_ERROR(0x4e6)}, + {NT_STATUS(0x80000001), W_ERROR(0x80000001)}, + {NT_STATUS(0x80000002), W_ERROR(0x3e6)}, + {NT_STATUS(0x80000003), W_ERROR(0x80000003)}, + {NT_STATUS(0x80000004), W_ERROR(0x80000004)}, + {NT_STATUS(0x80000005), W_ERROR(0xea)}, + {NT_STATUS(0x80000006), W_ERROR(0x12)}, + {NT_STATUS(0x8000000b), W_ERROR(0x56f)}, + {NT_STATUS(0x8000000d), W_ERROR(0x12b)}, + {NT_STATUS(0x8000000e), W_ERROR(0x1c)}, + {NT_STATUS(0x8000000f), W_ERROR(0x15)}, + {NT_STATUS(0x80000010), W_ERROR(0x15)}, + {NT_STATUS(0x80000011), W_ERROR(0xaa)}, + {NT_STATUS(0x80000012), W_ERROR(0x103)}, + {NT_STATUS(0x80000013), W_ERROR(0xfe)}, + {NT_STATUS(0x80000014), W_ERROR(0xff)}, + {NT_STATUS(0x80000015), W_ERROR(0xff)}, + {NT_STATUS(0x80000016), W_ERROR(0x456)}, + {NT_STATUS(0x8000001a), W_ERROR(0x103)}, + {NT_STATUS(0x8000001b), W_ERROR(0x44d)}, + {NT_STATUS(0x8000001c), W_ERROR(0x456)}, + {NT_STATUS(0x8000001d), W_ERROR(0x457)}, + {NT_STATUS(0x8000001e), W_ERROR(0x44c)}, + {NT_STATUS(0x8000001f), W_ERROR(0x44e)}, + {NT_STATUS(0x80000021), W_ERROR(0x44f)}, + {NT_STATUS(0x80000022), W_ERROR(0x450)}, + {NT_STATUS(0x80000025), W_ERROR(0x962)}, + {NT_STATUS(0x80000288), W_ERROR(0x48d)}, + {NT_STATUS(0x80000289), W_ERROR(0x48e)}, + {NT_STATUS_OK, WERR_OK}}; + /***************************************************************************** convert a dos eclas/ecode to a NT status32 code @@ -825,6 +1366,7 @@ convert a dos eclas/ecode to a NT status32 code NTSTATUS dos_to_ntstatus(int eclass, int ecode) { int i; + if (eclass == 0 && ecode == 0) return NT_STATUS_OK; for (i=0; NT_STATUS_V(dos_to_ntstatus_map[i].ntstatus); i++) { if (eclass == dos_to_ntstatus_map[i].dos_class && ecode == dos_to_ntstatus_map[i].dos_code) { @@ -841,6 +1383,11 @@ convert a NT status code to a dos class/code void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode) { int i; + if (NT_STATUS_IS_OK(ntstatus)) { + *eclass = 0; + *ecode = 0; + return; + } for (i=0; NT_STATUS_V(ntstatus_to_dos_map[i].ntstatus); i++) { if (NT_STATUS_V(ntstatus) == NT_STATUS_V(ntstatus_to_dos_map[i].ntstatus)) { @@ -852,3 +1399,40 @@ void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode) *eclass = ERRSRV; *ecode = ERRerror; } + + +/***************************************************************************** +convert a WERROR to a NT status32 code + *****************************************************************************/ +NTSTATUS werror_to_ntstatus(WERROR error) +{ + int i; + if (W_ERROR_IS_OK(error)) return NT_STATUS_OK; + for (i=0; NT_STATUS_V(ntstatus_to_werror_map[i].ntstatus); i++) { + if (W_ERROR_V(error) == + W_ERROR_V(ntstatus_to_werror_map[i].werror)) { + return ntstatus_to_werror_map[i].ntstatus; + } + } + + /* just guess ... */ + return NT_STATUS(W_ERROR_V(error) | 0xc0000000); +} + +/***************************************************************************** +convert a NTSTATUS to a WERROR + *****************************************************************************/ +WERROR ntstatus_to_werror(NTSTATUS error) +{ + int i; + if (NT_STATUS_IS_OK(error)) return WERR_OK; + for (i=0; NT_STATUS_V(ntstatus_to_werror_map[i].ntstatus); i++) { + if (NT_STATUS_V(error) == + NT_STATUS_V(ntstatus_to_werror_map[i].ntstatus)) { + return ntstatus_to_werror_map[i].werror; + } + } + + /* a lame guess */ + return W_ERROR(NT_STATUS_V(error) & 0xffff); +} -- cgit From 554d387ab33220e7dc02d7a8c1aba854277b92f3 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 23 Nov 2001 05:37:40 +0000 Subject: Added constants and error message for dos error code 1326 (logon failure). (This used to be commit 6ce1eec09de64f19d969a67fc236abd4ae277926) --- source3/libsmb/errormap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 65dcdf4bdf..18e70eed36 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -133,7 +133,7 @@ static struct { {ERRSRV, ERRbadpw, NT_STATUS_WRONG_PASSWORD}, {ERRDOS, 1324, NT_STATUS_ILL_FORMED_PASSWORD}, {ERRDOS, 1325, NT_STATUS_PASSWORD_RESTRICTION}, - {ERRDOS, 1326, NT_STATUS_LOGON_FAILURE}, + {ERRDOS, ERRlogonfailure, NT_STATUS_LOGON_FAILURE}, {ERRDOS, 1327, NT_STATUS_ACCOUNT_RESTRICTION}, {ERRDOS, 1328, NT_STATUS_INVALID_LOGON_HOURS}, {ERRDOS, 1329, NT_STATUS_INVALID_WORKSTATION}, -- cgit From d1b5508a7b8c9a8085db4bb9f0c0fa26b7eb542a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 23 Nov 2001 07:08:20 +0000 Subject: Update some of the error mapping, based on on-the-wire observations of an NT4 server. This lets our Win9X clients give sane error messages when you get passwords wrong and the like. Andrew Bartlett (This used to be commit f199e9518226ed57a011113bdf06c85265e49674) --- source3/libsmb/errormap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 18e70eed36..f4208e7f5e 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -135,10 +135,10 @@ static struct { {ERRDOS, 1325, NT_STATUS_PASSWORD_RESTRICTION}, {ERRDOS, ERRlogonfailure, NT_STATUS_LOGON_FAILURE}, {ERRDOS, 1327, NT_STATUS_ACCOUNT_RESTRICTION}, - {ERRDOS, 1328, NT_STATUS_INVALID_LOGON_HOURS}, - {ERRDOS, 1329, NT_STATUS_INVALID_WORKSTATION}, - {ERRDOS, 1330, NT_STATUS_PASSWORD_EXPIRED}, - {ERRDOS, 1331, NT_STATUS_ACCOUNT_DISABLED}, + {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}, @@ -374,7 +374,7 @@ static struct { {ERRDOS, 1501, NT_STATUS_EVENTLOG_CANT_START}, {ERRDOS, 1790, NT_STATUS_TRUST_FAILURE}, {ERRDOS, 1792, NT_STATUS_NETLOGON_NOT_STARTED}, - {ERRDOS, 1793, NT_STATUS_ACCOUNT_EXPIRED}, + {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}, @@ -408,14 +408,14 @@ static struct { {ERRDOS, 6118, NT_STATUS_NO_BROWSER_SERVERS_FOUND}, {ERRDOS, 1132, NT_STATUS_MAPPED_ALIGNMENT}, {ERRDOS, 193, NT_STATUS_IMAGE_CHECKSUM_MISMATCH}, - {ERRDOS, 1907, NT_STATUS_PASSWORD_MUST_CHANGE}, + {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}, - {ERRDOS, 1909, NT_STATUS_ACCOUNT_LOCKED_OUT}, + {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}, -- cgit From bf5a0e6717f786d4f623e3cca9f846a9413f82d5 Mon Sep 17 00:00:00 2001 From: Jean-François Micouleau Date: Mon, 10 Dec 2001 23:34:32 +0000 Subject: NT_STATUS(0x80000005) maps to ERRDOS,234 J.F. (This used to be commit 80e36549b61cc2bb5148f6abb175d31a0c7782a1) --- source3/libsmb/errormap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index f4208e7f5e..ab524a01f5 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -537,7 +537,7 @@ static struct { {ERRDOS, 998, NT_STATUS(0x80000002)}, {ERRDOS, ERRbadpath, NT_STATUS(0x80000003)}, {ERRDOS, ERRnofids, NT_STATUS(0x80000004)}, - {ERRDOS, 111, NT_STATUS(0x80000005)}, + {ERRDOS, 234, NT_STATUS(0x80000005)}, {ERRDOS, ERRnofiles, NT_STATUS(0x80000006)}, {ERRDOS, 1391, NT_STATUS(0x8000000b)}, {ERRDOS, 299, NT_STATUS(0x8000000d)}, -- cgit From 8d09eecf6987fe55c06cd1bcf202170cd8a47d8e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 1 Jan 2002 06:16:43 +0000 Subject: This brings the NT->DOS error mapping into better line with what NT does. I'll post the changes to the actual map to the list for comment, but this fixes the 'unknown' case. Andrew Bartlett (This used to be commit 024843a2cedb0b9f06a3351c5838caea372b6c5c) --- source3/libsmb/errormap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index ab524a01f5..cf3dc34618 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -1396,8 +1396,8 @@ void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode) return; } } - *eclass = ERRSRV; - *ecode = ERRerror; + *eclass = ERRHRD; + *ecode = ERRgeneral; } -- cgit From 80437a4cc0d88f47fb20901abf28590c35f3b09a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 3 Jan 2002 08:36:47 +0000 Subject: Update the NT_STATUS -> DOS error table. 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/libsmb/errormap.c | 831 ++++++++++++++++++++++++---------------------- 1 file changed, 427 insertions(+), 404 deletions(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index cf3dc34618..74711e01bf 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -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}, -- cgit From aa045c08b26b9fad2b2f4f314b6ce2bfbefe4380 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 5 Jan 2002 04:04:03 +0000 Subject: Add a comment on how this error map was derrived. This applies only to the NT->Dos map, I'm still trying to come up with a way to do the reverse. (This used to be commit 323dd422bd4bdeeee72c9200821e28f86d3072c8) --- source3/libsmb/errormap.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 74711e01bf..b2b638b229 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -21,6 +21,28 @@ #include "includes.h" +/* This map was extracted by the ERRMAPEXTRACT smbtorture command. + The setup was a Samba HEAD (2002-01-03) PDC and an Win2k member + workstation. The PDC was modified (by using the 'name_to_nt_status' + authentication module) to convert the username (in hex) into the + corresponding NTSTATUS error return. + + By opening two nbt sessions to the Win2k workstation, one negotiating + DOS and one negotiating NT errors it was possible to extract the + error mapping. (Because the server only supplies NT errors, the + NT4 workstation had to use its own error tables to convert these + to dos errors). + + Some errors show up as 'squashed' because the NT error connection + got back a different error to the one it sent, so a mapping could + not be determined (a guess has been made in this case, to map the + error as squashed). This is done mainly to prevent users from getting + NT_STATUS_WRONG_PASSWORD and NT_STATUS_NO_SUCH_USER errors (they get + NT_STATUS_LOGON_FAILURE instead. + + -- abartlet (2002-01-03) +*/ + /* NT status -> dos error map */ static struct { uint8 dos_class; -- cgit From d1baa1fda928bfcc1998575f2af71aaa001402aa Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 6 Jan 2002 02:55:37 +0000 Subject: DOS error 31 is ERRgeneral, General Failure. This is the WERROR equivalent to NT_STATUS_UNSUCCESSFUL according to AB's funky new error map. (This used to be commit 9c968fbb017d3369ac207e65348a9a22dbed0213) --- source3/libsmb/errormap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index b2b638b229..1c44675c83 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -49,7 +49,7 @@ static struct { uint32 dos_code; NTSTATUS ntstatus; } ntstatus_to_dos_map[] = { - {ERRDOS, 31, NT_STATUS_UNSUCCESSFUL}, + {ERRDOS, ERRgeneral, NT_STATUS_UNSUCCESSFUL}, {ERRDOS, ERRbadfunc, NT_STATUS_NOT_IMPLEMENTED}, {ERRDOS, 87, NT_STATUS_INVALID_INFO_CLASS}, {ERRDOS, 24, NT_STATUS_INFO_LENGTH_MISMATCH}, -- cgit From 04ec469c72c6a220108312cdec3d30081cfe938a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 16 Jan 2002 21:27:57 +0000 Subject: Fixup error mapping so we have only one table containing errno -> dos error -> NT STATUS maps. Fixes problem with disk full returning incorrect error. Jeremy. (This used to be commit 16fcbf3c1ccf1d704765653f68395dd596c0d841) --- source3/libsmb/errormap.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 1c44675c83..401a07b77d 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -773,6 +773,7 @@ static struct { {ERRHRD, ERRlock, NT_STATUS_FILE_LOCK_CONFLICT}, {ERRHRD, ERRwrongdisk, NT_STATUS_WRONG_VOLUME}, {ERRHRD, 38, NT_STATUS_END_OF_FILE}, + {ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL}, {ERRHRD, 50, NT_STATUS_CTL_FILE_NOT_SUPPORTED}, {ERRHRD, 51, NT_STATUS_REMOTE_NOT_LISTENING}, {ERRHRD, 52, NT_STATUS_DUPLICATE_NAME}, -- cgit From ab3cae976800edd206d6c5b88bb4bd40b133f970 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 17 Jan 2002 01:05:34 +0000 Subject: fixed a typo in the error map for WRONG_PASSWORD (This used to be commit fb300e411bb385dcba2c3ca166598a71ed693b35) --- source3/libsmb/errormap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 401a07b77d..28b4cb0431 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -175,7 +175,7 @@ static struct { from NT_STATUS_WRONG_PASSWORD to NT_STATUS_LOGON_FAILURE during the session setup } */ - {ERRDOS, ERRbadpw, NT_STATUS_WRONG_PASSWORD}, + {ERRSRV, ERRbadpw, NT_STATUS_WRONG_PASSWORD}, {ERRHRD, ERRgeneral, NT_STATUS_ILL_FORMED_PASSWORD}, {ERRHRD, ERRgeneral, NT_STATUS_PASSWORD_RESTRICTION}, {ERRDOS, ERRnoaccess, NT_STATUS_LOGON_FAILURE}, -- cgit From cd68afe31256ad60748b34f7318a180cfc2127cc Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 30 Jan 2002 06:08:46 +0000 Subject: Removed version number from file header. Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa) --- source3/libsmb/errormap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 28b4cb0431..a4a5a8741e 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -1,6 +1,5 @@ /* - * Unix SMB/Netbios implementation. - * Version 3.0 + * Unix SMB/CIFS implementation. * error mapping functions * Copyright (C) Andrew Tridgell 2001 * -- cgit From 33dd5128961f2a39cd70c7b6766a524aba2443d7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 23 Mar 2002 08:45:03 +0000 Subject: Make a number of the lookup tables 'const'. I'm told this assists in sharing memory between users of shared libs. Andrew Bartlett (This used to be commit 41dd5a4d292bb08fa313f6220014cd9b4490237b) --- source3/libsmb/errormap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index a4a5a8741e..c30db3ad95 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -43,7 +43,7 @@ */ /* NT status -> dos error map */ -static struct { +const static struct { uint8 dos_class; uint32 dos_code; NTSTATUS ntstatus; @@ -609,7 +609,7 @@ static struct { /* dos -> nt status error map */ -static struct { +const static struct { uint8 dos_class; uint32 dos_code; NTSTATUS ntstatus; @@ -864,7 +864,7 @@ static struct { }; /* errmap NTSTATUS->Win32 */ -static struct { +const static struct { NTSTATUS ntstatus; WERROR werror; } ntstatus_to_werror_map[] = { -- cgit From e90b65284812aaa5ff9e9935ce9bbad7791cbbcd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Jul 2002 10:35:28 +0000 Subject: updated the 3.0 branch from the head branch - ready for alpha18 (This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce) --- source3/libsmb/errormap.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index c30db3ad95..a35108c3de 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -2,6 +2,7 @@ * Unix SMB/CIFS implementation. * error mapping functions * Copyright (C) Andrew Tridgell 2001 + * Copyright (C) Andrew Bartlett 2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by -- cgit From 115f859a85cd31aff9935cbe9f9f7b43be303140 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Sun, 10 Nov 2002 04:34:03 +0000 Subject: sync with head was: consolidate alla error mapping functions in one file (This used to be commit 2c9e8b79d94e3276e9eb9bd676af0a68ee3908ff) --- source3/libsmb/errormap.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index a35108c3de..f310399616 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -3,6 +3,7 @@ * error mapping functions * Copyright (C) Andrew Tridgell 2001 * Copyright (C) Andrew Bartlett 2001 + * Copyright (C) Tim Potter 2000 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1482,3 +1483,58 @@ WERROR ntstatus_to_werror(NTSTATUS error) /* a lame guess */ return W_ERROR(NT_STATUS_V(error) & 0xffff); } + + +/* Mapping between Unix, DOS and NT error numbers */ + +const struct unix_error_map unix_dos_nt_errmap[] = { + { EPERM, ERRDOS, ERRnoaccess, NT_STATUS_ACCESS_DENIED }, + { EACCES, ERRDOS, ERRnoaccess, NT_STATUS_ACCESS_DENIED }, + { ENOENT, ERRDOS, ERRbadfile, NT_STATUS_OBJECT_NAME_NOT_FOUND }, + { ENOTDIR, ERRDOS, ERRbadpath, NT_STATUS_OBJECT_PATH_NOT_FOUND }, + { EIO, ERRHRD, ERRgeneral, NT_STATUS_IO_DEVICE_ERROR }, + { EBADF, ERRSRV, ERRsrverror, NT_STATUS_INVALID_HANDLE }, + { EINVAL, ERRSRV, ERRsrverror, NT_STATUS_INVALID_HANDLE }, + { EEXIST, ERRDOS, ERRfilexists, NT_STATUS_OBJECT_NAME_COLLISION}, + { ENFILE, ERRDOS, ERRnofids, NT_STATUS_TOO_MANY_OPENED_FILES }, + { EMFILE, ERRDOS, ERRnofids, NT_STATUS_TOO_MANY_OPENED_FILES }, + { ENOSPC, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL }, +#ifdef EDQUOT + { EDQUOT, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL }, +#endif +#ifdef ENOTEMPTY + { ENOTEMPTY, ERRDOS, ERRnoaccess, NT_STATUS_DIRECTORY_NOT_EMPTY }, +#endif +#ifdef EXDEV + { EXDEV, ERRDOS, ERRdiffdevice, NT_STATUS_NOT_SAME_DEVICE }, +#endif +#ifdef EROFS + { EROFS, ERRHRD, ERRnowrite, NT_STATUS_ACCESS_DENIED }, +#endif +#ifdef ENAMETOOLONG + { ENAMETOOLONG, ERRDOS, 206, NT_STATUS_OBJECT_NAME_INVALID }, +#endif + { 0, 0, 0, NT_STATUS_OK } +}; + +/********************************************************************* + Map an NT error code from a Unix error code. +*********************************************************************/ + +NTSTATUS map_nt_error_from_unix(int unix_error) +{ + int i = 0; + + if (unix_error == 0) + return NT_STATUS_OK; + + /* Look through list */ + while(unix_dos_nt_errmap[i].unix_error != 0) { + if (unix_dos_nt_errmap[i].unix_error == unix_error) + return unix_dos_nt_errmap[i].nt_error; + i++; + } + + /* Default return */ + return NT_STATUS_ACCESS_DENIED; +} -- cgit From f3e3a56ea9085b186af24b0b4e911863fd9ceacc Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 29 Nov 2002 02:58:59 +0000 Subject: Merge a bunch of trivial changes from HEAD. The difference remaining should actual functional differences between HEAD and 3.0. - Mostly reformatting - Removal of unecessary #include "smb.h" - Merge of dyn_DRIVERFILE removal - Silly bug fix for python code (This used to be commit d3998307adc50ba50defe610cb656c73799ae3b9) --- source3/libsmb/errormap.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index f310399616..7c28c7e8aa 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -1484,7 +1484,6 @@ WERROR ntstatus_to_werror(NTSTATUS error) return W_ERROR(NT_STATUS_V(error) & 0xffff); } - /* Mapping between Unix, DOS and NT error numbers */ const struct unix_error_map unix_dos_nt_errmap[] = { -- cgit From f2def025e277081ac86d68060fed3e10994eaa44 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 11 Dec 2002 18:52:21 +0000 Subject: Fix write error returning EFBIG - found by Conrad. Jeremy. (This used to be commit e258887f508db3d2c923f393f0104e7cf1bd6545) --- source3/libsmb/errormap.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 7c28c7e8aa..8bd29b55c0 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -1512,6 +1512,9 @@ const struct unix_error_map unix_dos_nt_errmap[] = { #endif #ifdef ENAMETOOLONG { ENAMETOOLONG, ERRDOS, 206, NT_STATUS_OBJECT_NAME_INVALID }, +#endif +#ifdef EFBIG + { EFBIG, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL }, #endif { 0, 0, 0, NT_STATUS_OK } }; -- cgit From 634c54310c92c48dd4eceec602e230a021bdcfc5 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 3 Jan 2003 08:28:12 +0000 Subject: Merge from HEAD - make Samba compile with -Wwrite-strings without additional warnings. (Adds a lot of const). Andrew Bartlett (This used to be commit 3a7458f9472432ef12c43008414925fd1ce8ea0c) --- source3/libsmb/errormap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 8bd29b55c0..09340caccd 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -45,7 +45,7 @@ */ /* NT status -> dos error map */ -const static struct { +static const struct { uint8 dos_class; uint32 dos_code; NTSTATUS ntstatus; @@ -611,7 +611,7 @@ const static struct { /* dos -> nt status error map */ -const static struct { +static const struct { uint8 dos_class; uint32 dos_code; NTSTATUS ntstatus; @@ -866,7 +866,7 @@ const static struct { }; /* errmap NTSTATUS->Win32 */ -const static struct { +static const struct { NTSTATUS ntstatus; WERROR werror; } ntstatus_to_werror_map[] = { -- cgit From 251ea1e6776401005e302addd56a689c01924426 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 19 Feb 2003 12:31:16 +0000 Subject: Merge minor library fixes from HEAD to 3.0. - setenv() replacement - mimir's ASN1/SPNEGO typo fixes - (size_t)-1 fixes for push_* returns - function argument signed/unsigned correction - ASN1 error handling (ensure we don't use initiailsed data) - extra net ads join error checking - allow 'set security discriptor' to fail - escape ldap strings in libads. - getgrouplist() correctness fixes (include primary gid) Andrew Bartlett (This used to be commit e9d6e2ea9a3dc01d3849b925c50702cda6ddf225) --- source3/libsmb/errormap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 09340caccd..8ee5ee3d31 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -1410,7 +1410,7 @@ static const struct { /***************************************************************************** convert a dos eclas/ecode to a NT status32 code *****************************************************************************/ -NTSTATUS dos_to_ntstatus(int eclass, int ecode) +NTSTATUS dos_to_ntstatus(uint8 eclass, uint32 ecode) { int i; if (eclass == 0 && ecode == 0) return NT_STATUS_OK; -- cgit From ef915c8eaf1d8335aa331d3b2376c40e3a63de22 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 1 Aug 2003 06:10:30 +0000 Subject: Final fix for the bug tridge found. Only push locks onto a blocking lock queue if the posix lock failed with EACCES or EAGAIN (this means another lock conflicts). Else return an error and don't queue the request. Jeremy. (This used to be commit 43fbc18fdc184bf29c15186c16bc99fb208de963) --- source3/libsmb/errormap.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 8ee5ee3d31..3d99e3d5e5 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -1498,6 +1498,7 @@ const struct unix_error_map unix_dos_nt_errmap[] = { { ENFILE, ERRDOS, ERRnofids, NT_STATUS_TOO_MANY_OPENED_FILES }, { EMFILE, ERRDOS, ERRnofids, NT_STATUS_TOO_MANY_OPENED_FILES }, { ENOSPC, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL }, + { ENOMEM, ERRDOS, ERRnomem, NT_STATUS_NO_MEMORY }, #ifdef EDQUOT { EDQUOT, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL }, #endif -- cgit From 52f63783bcc42cc4a1351ad9176d24a73a26c5eb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 8 Oct 2003 23:21:36 +0000 Subject: Fixup error code returns from Samba4 tester. Ensure invalid paths are validated the same way. Jeremy. (This used to be commit 6ad2f0ba27566ab3928ccbbbb3c3a64b09ca139c) --- source3/libsmb/errormap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 3d99e3d5e5..4d9a717e1c 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -1490,7 +1490,7 @@ const struct unix_error_map unix_dos_nt_errmap[] = { { EPERM, ERRDOS, ERRnoaccess, NT_STATUS_ACCESS_DENIED }, { EACCES, ERRDOS, ERRnoaccess, NT_STATUS_ACCESS_DENIED }, { ENOENT, ERRDOS, ERRbadfile, NT_STATUS_OBJECT_NAME_NOT_FOUND }, - { ENOTDIR, ERRDOS, ERRbadpath, NT_STATUS_OBJECT_PATH_NOT_FOUND }, + { ENOTDIR, ERRDOS, ERRbadpath, NT_STATUS_NOT_A_DIRECTORY }, { EIO, ERRHRD, ERRgeneral, NT_STATUS_IO_DEVICE_ERROR }, { EBADF, ERRSRV, ERRsrverror, NT_STATUS_INVALID_HANDLE }, { EINVAL, ERRSRV, ERRsrverror, NT_STATUS_INVALID_HANDLE }, -- cgit From 5114dee2716f9703f2eee07a891d77a15f4b6a82 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 21 Oct 2003 23:14:41 +0000 Subject: Fix for bug #64, Win9x Nexus tools not working against Samba3.0. Missing map in errormap for ERROR_MORE_DATA -> ERRDOS, ERRmoredata. Jeremy. (This used to be commit 7eaae388b35cb3d20cdd968b00d65c88fcee5878) --- source3/libsmb/errormap.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 4d9a717e1c..116d2cefe1 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -98,6 +98,10 @@ static const struct { */ {ERRDOS, ERRnoaccess, NT_STATUS_ACCESS_DENIED}, {ERRDOS, 111, NT_STATUS_BUFFER_TOO_SMALL}, +/* + * Not an official error, as only bit 0x80000000, not bits 0xC0000000 are set. + */ + {ERRDOS, ERRmoredata, STATUS_BUFFER_OVERFLOW}, {ERRDOS, ERRbadfid, NT_STATUS_OBJECT_TYPE_MISMATCH}, {ERRHRD, ERRgeneral, NT_STATUS_NONCONTINUABLE_EXCEPTION}, {ERRHRD, ERRgeneral, NT_STATUS_INVALID_DISPOSITION}, -- cgit From 3fb52e5cc0fe632584704e807dde5f0ae6612413 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 28 Feb 2004 01:53:30 +0000 Subject: Can't set allocation size on directories, return correct error code on fail if file exists and target is a directory. gentest. Jeremy. (This used to be commit f4a7ea6dc2b9f379a9c735670a49ac63818754c7) --- source3/libsmb/errormap.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 116d2cefe1..aeb68b6596 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -1503,6 +1503,7 @@ const struct unix_error_map unix_dos_nt_errmap[] = { { EMFILE, ERRDOS, ERRnofids, NT_STATUS_TOO_MANY_OPENED_FILES }, { ENOSPC, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL }, { ENOMEM, ERRDOS, ERRnomem, NT_STATUS_NO_MEMORY }, + { EISDIR, ERRDOS, ERRnoaccess, NT_STATUS_FILE_IS_A_DIRECTORY}, #ifdef EDQUOT { EDQUOT, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL }, #endif -- cgit From 0922c254c6c8c941ebc7321b1c7114c1a5abd880 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Thu, 29 Apr 2004 22:41:47 +0000 Subject: r415: Return NT_STATUS_ACCESS_DENIED not some LOCK message ... (This used to be commit 164ff9a192e82be6eaef7b6e7c03e5dc7203f3de) --- source3/libsmb/errormap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index aeb68b6596..77c71fce13 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -627,7 +627,7 @@ static const struct { {ERRDOS, ERRnoaccess, NT_STATUS_ACCESS_DENIED}, {ERRDOS, ERRbadfid, NT_STATUS_INVALID_HANDLE}, {ERRDOS, ERRnomem, NT_STATUS_INSUFFICIENT_RESOURCES}, - {ERRDOS, ERRbadaccess, NT_STATUS_INVALID_LOCK_SEQUENCE}, + {ERRDOS, ERRbadaccess, NT_STATUS_ACCESS_DENIED}, {ERRDOS, ERRbaddata, NT_STATUS_DATA_ERROR}, {ERRDOS, 14, NT_STATUS_SECTION_NOT_EXTENDED}, {ERRDOS, ERRremcd, NT_STATUS_DIRECTORY_NOT_EMPTY}, -- cgit From 8875124a61c63d2def8ec193a98732f6fcfaa6a1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 24 Sep 2004 00:55:46 +0000 Subject: r2575: Return correct error codes on old SEARCH call (from Samba4 torture tester). Jeremy. (This used to be commit fc51c97ea86bd1a86830d4ab2c6c7c4ec9fccc88) --- source3/libsmb/errormap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 77c71fce13..8ac1aed923 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -102,6 +102,7 @@ static const struct { * Not an official error, as only bit 0x80000000, not bits 0xC0000000 are set. */ {ERRDOS, ERRmoredata, STATUS_BUFFER_OVERFLOW}, + {ERRDOS, ERRnofiles, STATUS_NO_MORE_FILES}, {ERRDOS, ERRbadfid, NT_STATUS_OBJECT_TYPE_MISMATCH}, {ERRHRD, ERRgeneral, NT_STATUS_NONCONTINUABLE_EXCEPTION}, {ERRHRD, ERRgeneral, NT_STATUS_INVALID_DISPOSITION}, @@ -632,7 +633,7 @@ static const struct { {ERRDOS, 14, NT_STATUS_SECTION_NOT_EXTENDED}, {ERRDOS, ERRremcd, NT_STATUS_DIRECTORY_NOT_EMPTY}, {ERRDOS, ERRdiffdevice, NT_STATUS_NOT_SAME_DEVICE}, - {ERRDOS, ERRnofiles, NT_STATUS(0x80000006)}, + {ERRDOS, ERRnofiles, STATUS_NO_MORE_FILES}, {ERRDOS, 19, NT_STATUS_MEDIA_WRITE_PROTECTED}, {ERRDOS, 21, NT_STATUS_NO_MEDIA_IN_DEVICE}, {ERRDOS, 22, NT_STATUS_INVALID_DEVICE_STATE}, -- cgit From d7173b35e918292694b9cf27ecbcad3c9cc86da6 Mon Sep 17 00:00:00 2001 From: Steve French Date: Sun, 24 Apr 2005 02:59:40 +0000 Subject: r6447: Add missing error mapping for EMLINK to NT_STATUS_TOO_MANY_LINKS (we have it the other direction in clierror already). This fixes the return code when we try to hardlink from a client. (This used to be commit ccbdffb94e22c17b03b0a464071df027ebdc6264) --- source3/libsmb/errormap.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 8ac1aed923..c79561bda8 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -1505,6 +1505,7 @@ const struct unix_error_map unix_dos_nt_errmap[] = { { ENOSPC, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL }, { ENOMEM, ERRDOS, ERRnomem, NT_STATUS_NO_MEMORY }, { EISDIR, ERRDOS, ERRnoaccess, NT_STATUS_FILE_IS_A_DIRECTORY}, + { EMLINK, ERRDOS, ERRgeneral, NT_STATUS_TOO_MANY_LINKS }, #ifdef EDQUOT { EDQUOT, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL }, #endif -- cgit From af8a691db11a5072865f8b03fd1cbd3aab5cb6d7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 8 Jul 2005 04:51:27 +0000 Subject: r8219: Merge the new open code from HEAD to 3.0. Haven't yet run the torture tests on this as it's very late NY time (just wanted to get this work into the tree). I'll test this over the weekend.... Jerry - in looking at the difference between the two trees there seem to be some printing/ntprinting.c and registry changes we might want to examine to try keep in sync. Jeremy. (This used to be commit c7fe18761e2c753afbffd3a78abff46472a9b8eb) --- source3/libsmb/errormap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index c79561bda8..8462fbee87 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -124,9 +124,9 @@ static const struct { {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, ERRinvalidpath, NT_STATUS_OBJECT_PATH_INVALID}, {ERRDOS, ERRbadpath, NT_STATUS_OBJECT_PATH_NOT_FOUND}, - {ERRDOS, 161, NT_STATUS_OBJECT_PATH_SYNTAX_BAD}, + {ERRDOS, ERRinvalidpath, NT_STATUS_OBJECT_PATH_SYNTAX_BAD}, {ERRHRD, ERRgeneral, NT_STATUS_DATA_OVERRUN}, {ERRHRD, ERRgeneral, NT_STATUS_DATA_LATE_ERROR}, {ERRDOS, 23, NT_STATUS_DATA_ERROR}, -- cgit From 54abd2aa66069e6baf7769c496f46d9dba18db39 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 30 Sep 2005 17:13:37 +0000 Subject: r10656: BIG merge from trunk. Features not copied over * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3) --- source3/libsmb/errormap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 8462fbee87..3c0b13ad6f 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -62,7 +62,7 @@ static const struct { {ERRDOS, 193, NT_STATUS_BAD_INITIAL_PC}, {ERRDOS, 87, NT_STATUS_INVALID_CID}, {ERRHRD, ERRgeneral, NT_STATUS_TIMER_NOT_CANCELED}, - {ERRDOS, 87, NT_STATUS_INVALID_PARAMETER}, + {ERRDOS, ERRinvalidparam, NT_STATUS_INVALID_PARAMETER}, {ERRDOS, ERRbadfile, NT_STATUS_NO_SUCH_DEVICE}, {ERRDOS, ERRbadfile, NT_STATUS_NO_SUCH_FILE}, {ERRDOS, ERRbadfunc, NT_STATUS_INVALID_DEVICE_REQUEST}, @@ -338,7 +338,7 @@ static const struct { {ERRDOS, 203, NT_STATUS(0xc0000100)}, {ERRDOS, 145, NT_STATUS_DIRECTORY_NOT_EMPTY}, {ERRHRD, ERRgeneral, NT_STATUS_FILE_CORRUPT_ERROR}, - {ERRDOS, 267, NT_STATUS_NOT_A_DIRECTORY}, + {ERRDOS, ERRbaddirectory, NT_STATUS_NOT_A_DIRECTORY}, {ERRHRD, ERRgeneral, NT_STATUS_BAD_LOGON_SESSION_STATE}, {ERRHRD, ERRgeneral, NT_STATUS_LOGON_SESSION_COLLISION}, {ERRDOS, 206, NT_STATUS_NAME_TOO_LONG}, -- cgit From 0af1500fc0bafe61019f1b2ab1d9e1d369221240 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 3 Feb 2006 22:19:41 +0000 Subject: r13316: Let the carnage begin.... Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f) --- source3/libsmb/errormap.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 3c0b13ad6f..f6b5af068a 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -1411,6 +1411,13 @@ static const struct { {NT_STATUS(0x80000289), W_ERROR(0x48e)}, {NT_STATUS_OK, WERR_OK}}; +static const struct { + WERROR werror; + NTSTATUS ntstatus; +} werror_to_ntstatus_map[] = { + { W_ERROR(0x5), NT_STATUS_ACCESS_DENIED }, + { WERR_OK, NT_STATUS_OK } +}; /***************************************************************************** convert a dos eclas/ecode to a NT status32 code @@ -1460,6 +1467,14 @@ NTSTATUS werror_to_ntstatus(WERROR error) { int i; if (W_ERROR_IS_OK(error)) return NT_STATUS_OK; + + for (i=0; !W_ERROR_IS_OK(werror_to_ntstatus_map[i].werror); i++) { + if (W_ERROR_V(error) == + W_ERROR_V(werror_to_ntstatus_map[i].werror)) { + return werror_to_ntstatus_map[i].ntstatus; + } + } + for (i=0; NT_STATUS_V(ntstatus_to_werror_map[i].ntstatus); i++) { if (W_ERROR_V(error) == W_ERROR_V(ntstatus_to_werror_map[i].werror)) { -- cgit From 22dbd67708f1651a2341d70ce576fac360affccf Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 10 Apr 2006 15:33:04 +0000 Subject: r15018: Merge Volker's ipc/trans2/nttrans changes over into 3.0. Also merge the new POSIX lock code - this is not enabled unless -DDEVELOPER is defined. This doesn't yet map onto underlying system POSIX locks. Updates vfs to allow lock queries. Jeremy. (This used to be commit 08e52ead03304ff04229e1bfe544ff40e2564fc7) --- source3/libsmb/errormap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index f6b5af068a..b3caa0a80c 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -407,7 +407,7 @@ static const struct { {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}, + {ERRDOS, ERRunknownlevel, NT_STATUS_INVALID_LEVEL}, {ERRDOS, 86, NT_STATUS_WRONG_PASSWORD_CORE}, {ERRHRD, ERRgeneral, NT_STATUS_ILLEGAL_FLOAT_CONTEXT}, {ERRDOS, 109, NT_STATUS_PIPE_BROKEN}, @@ -680,7 +680,7 @@ static const struct { {ERRDOS, 121, NT_STATUS_IO_TIMEOUT}, {ERRDOS, 122, NT_STATUS_BUFFER_TOO_SMALL}, {ERRDOS, ERRinvalidname, NT_STATUS_OBJECT_NAME_INVALID}, - {ERRDOS, 124, NT_STATUS_INVALID_LEVEL}, + {ERRDOS, ERRunknownlevel, NT_STATUS_INVALID_LEVEL}, {ERRDOS, 126, NT_STATUS_DLL_NOT_FOUND}, {ERRDOS, 127, NT_STATUS_PROCEDURE_NOT_FOUND}, {ERRDOS, 145, NT_STATUS_DIRECTORY_NOT_EMPTY}, -- cgit From 74cd692d9b34ef8344a36d3b01bd24fa9108d9b6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 25 Jul 2006 16:48:08 +0000 Subject: r17234: Fix error mappings for EQUOTA and ENOBUFS. Based on an idea from Shlomi Yaakobovich . Jeremy. (This used to be commit 9c440925f879d1e4ef99d04e2dfbe41077869204) --- source3/libsmb/errormap.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index b3caa0a80c..a5e922fd5c 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -779,7 +779,11 @@ static const struct { {ERRHRD, ERRlock, NT_STATUS_FILE_LOCK_CONFLICT}, {ERRHRD, ERRwrongdisk, NT_STATUS_WRONG_VOLUME}, {ERRHRD, 38, NT_STATUS_END_OF_FILE}, +#if defined(WITH_QUOTAS) && defined(EDQUOT) + {ERRHRD, ERRdiskfull, NT_STATUS_QUOTA_EXCEEDED}, +#else {ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL}, +#endif {ERRHRD, 50, NT_STATUS_CTL_FILE_NOT_SUPPORTED}, {ERRHRD, 51, NT_STATUS_REMOTE_NOT_LISTENING}, {ERRHRD, 52, NT_STATUS_DUPLICATE_NAME}, @@ -1522,7 +1526,7 @@ const struct unix_error_map unix_dos_nt_errmap[] = { { EISDIR, ERRDOS, ERRnoaccess, NT_STATUS_FILE_IS_A_DIRECTORY}, { EMLINK, ERRDOS, ERRgeneral, NT_STATUS_TOO_MANY_LINKS }, #ifdef EDQUOT - { EDQUOT, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL }, + { EDQUOT, ERRHRD, ERRdiskfull, NT_STATUS_QUOTA_EXCEEDED }, #endif #ifdef ENOTEMPTY { ENOTEMPTY, ERRDOS, ERRnoaccess, NT_STATUS_DIRECTORY_NOT_EMPTY }, @@ -1538,6 +1542,9 @@ const struct unix_error_map unix_dos_nt_errmap[] = { #endif #ifdef EFBIG { EFBIG, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL }, +#endif +#ifdef ENOBUFS + { ENOBUFS, ERRDOS, ERRnomem, NT_STATUS_INSUFFICIENT_RESOURCES }, #endif { 0, 0, 0, NT_STATUS_OK } }; -- cgit From 8f93665bb5db57e3725487373e68a476a8e31d6d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 26 Jul 2006 17:24:54 +0000 Subject: r17262: After messages from Metze and traces from Karolin Seeger, turns out that EDQUOTA must map to NT_STATUS_DISK_FULL for Windows apps to work correctly. My mistake. Jeremy. (This used to be commit de1e3f7a7ae9e8a41b45130e2cdfc22f43cf53b5) --- source3/libsmb/errormap.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index a5e922fd5c..cb5e8311ca 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -779,11 +779,7 @@ static const struct { {ERRHRD, ERRlock, NT_STATUS_FILE_LOCK_CONFLICT}, {ERRHRD, ERRwrongdisk, NT_STATUS_WRONG_VOLUME}, {ERRHRD, 38, NT_STATUS_END_OF_FILE}, -#if defined(WITH_QUOTAS) && defined(EDQUOT) - {ERRHRD, ERRdiskfull, NT_STATUS_QUOTA_EXCEEDED}, -#else {ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL}, -#endif {ERRHRD, 50, NT_STATUS_CTL_FILE_NOT_SUPPORTED}, {ERRHRD, 51, NT_STATUS_REMOTE_NOT_LISTENING}, {ERRHRD, 52, NT_STATUS_DUPLICATE_NAME}, @@ -1526,7 +1522,7 @@ const struct unix_error_map unix_dos_nt_errmap[] = { { EISDIR, ERRDOS, ERRnoaccess, NT_STATUS_FILE_IS_A_DIRECTORY}, { EMLINK, ERRDOS, ERRgeneral, NT_STATUS_TOO_MANY_LINKS }, #ifdef EDQUOT - { EDQUOT, ERRHRD, ERRdiskfull, NT_STATUS_QUOTA_EXCEEDED }, + { EDQUOT, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL }, /* Windows apps need this, not NT_STATUS_QUOTA_EXCEEDED */ #endif #ifdef ENOTEMPTY { ENOTEMPTY, ERRDOS, ERRnoaccess, NT_STATUS_DIRECTORY_NOT_EMPTY }, -- cgit From 41a4496b20e510dc47fe2b816196cef6fe937cea Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 18 Aug 2006 15:10:46 +0000 Subject: r17606: Introduce krb5_to_ntstatus. Thanks to Michael Adam Volker (This used to be commit 6e641c90b8f52a822a83701cdf305c60416d7f0c) --- source3/libsmb/errormap.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index cb5e8311ca..7758246929 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -1566,3 +1566,40 @@ NTSTATUS map_nt_error_from_unix(int unix_error) /* Default return */ return NT_STATUS_ACCESS_DENIED; } + +#ifdef HAVE_KRB5 +/********************************************************************* + Map a krb5 error code to an NT error code +*********************************************************************/ + +struct krb5_error_map { + int krb5_error; + NTSTATUS nt_error; +}; + +const struct krb5_error_map krb5_nt_errmap[] = { + { KRB5KDC_ERR_PREAUTH_FAILED, NT_STATUS_LOGON_FAILURE }, + { KRB5_KDC_UNREACH, NT_STATUS_NO_LOGON_SERVERS }, + { KRB5KRB_AP_ERR_SKEW, NT_STATUS_TIME_DIFFERENCE_AT_DC }, + /* not sure if this mapping is appropriate */ + { KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN, NT_STATUS_NO_TRUST_SAM_ACCOUNT }, + { KRB5KDC_ERR_NONE, NT_STATUS_OK }, + /* end of array flag - not used as error code... */ + { 0, NT_STATUS_OK } +}; + +NTSTATUS krb5_to_ntstatus(int error) +{ + int i = 0; + + while (krb5_nt_errmap[i].krb5_error != 0) { + if (krb5_nt_errmap[i].krb5_error == error) { + return krb5_nt_errmap[i].nt_error; + } + i++; + } + + return NT_STATUS_ACCESS_DENIED; +} +#endif + -- cgit From 58247fea05a7420d8eafa0b8ea03944e9422cb6c Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 22 Aug 2006 00:36:31 +0000 Subject: r17677: There is no need for a 2nd krb5_to_nt_status function, is there? Michael Adam/Volker, please check. Guenther (This used to be commit d0feb85781f69325ee70aff98370cfac037c4cc2) --- source3/libsmb/errormap.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 7758246929..cb5e8311ca 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -1566,40 +1566,3 @@ NTSTATUS map_nt_error_from_unix(int unix_error) /* Default return */ return NT_STATUS_ACCESS_DENIED; } - -#ifdef HAVE_KRB5 -/********************************************************************* - Map a krb5 error code to an NT error code -*********************************************************************/ - -struct krb5_error_map { - int krb5_error; - NTSTATUS nt_error; -}; - -const struct krb5_error_map krb5_nt_errmap[] = { - { KRB5KDC_ERR_PREAUTH_FAILED, NT_STATUS_LOGON_FAILURE }, - { KRB5_KDC_UNREACH, NT_STATUS_NO_LOGON_SERVERS }, - { KRB5KRB_AP_ERR_SKEW, NT_STATUS_TIME_DIFFERENCE_AT_DC }, - /* not sure if this mapping is appropriate */ - { KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN, NT_STATUS_NO_TRUST_SAM_ACCOUNT }, - { KRB5KDC_ERR_NONE, NT_STATUS_OK }, - /* end of array flag - not used as error code... */ - { 0, NT_STATUS_OK } -}; - -NTSTATUS krb5_to_ntstatus(int error) -{ - int i = 0; - - while (krb5_nt_errmap[i].krb5_error != 0) { - if (krb5_nt_errmap[i].krb5_error == error) { - return krb5_nt_errmap[i].nt_error; - } - i++; - } - - return NT_STATUS_ACCESS_DENIED; -} -#endif - -- cgit From 3adeddcc4a948ec230db7ea4a6b0d3f1640ff3a6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 27 Mar 2007 00:00:50 +0000 Subject: r21967: Add conversion from gss errors to nt status. Jeremy (This used to be commit 8ba138efd097b08dcfe98f99b67c77579babf250) --- source3/libsmb/errormap.c | 102 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index cb5e8311ca..a78b0af81a 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -4,6 +4,7 @@ * Copyright (C) Andrew Tridgell 2001 * Copyright (C) Andrew Bartlett 2001 * Copyright (C) Tim Potter 2000 + * Copyright (C) Jeremy Allison 2007 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1566,3 +1567,104 @@ NTSTATUS map_nt_error_from_unix(int unix_error) /* Default return */ return NT_STATUS_ACCESS_DENIED; } + +#if defined(HAVE_GSSAPI) +/******************************************************************************* + Map between gssapi errors and NT status. I made these up :-(. JRA. +*******************************************************************************/ + +static const struct { + unsigned long gss_err; + NTSTATUS ntstatus; +} gss_to_ntstatus_errormap[] = { +#if defined(GSS_S_CALL_INACCESSIBLE_READ) + {GSS_S_CALL_INACCESSIBLE_READ, NT_STATUS_INVALID_PARAMETER}, +#endif +#if defined(GSS_S_CALL_INACCESSIBLE_WRITE) + {GSS_S_CALL_INACCESSIBLE_WRITE, NT_STATUS_INVALID_PARAMETER}, +#endif +#if defined(GSS_S_CALL_BAD_STRUCTURE) + {GSS_S_CALL_BAD_STRUCTURE, NT_STATUS_INVALID_PARAMETER}, +#endif +#if defined(GSS_S_BAD_MECH) + {GSS_S_BAD_MECH, NT_STATUS_INVALID_PARAMETER}, +#endif +#if defined(GSS_S_BAD_NAME) + {GSS_S_BAD_NAME, NT_STATUS_INVALID_ACCOUNT_NAME}, +#endif +#if defined(GSS_S_BAD_NAMETYPE) + {GSS_S_BAD_NAMETYPE, NT_STATUS_INVALID_PARAMETER}, +#endif +#if defined(GSS_S_BAD_BINDINGS) + {GSS_S_BAD_BINDINGS, NT_STATUS_INVALID_PARAMETER}, +#endif +#if defined(GSS_S_BAD_STATUS) + {GSS_S_BAD_STATUS, NT_STATUS_UNSUCCESSFUL}, +#endif +#if defined(GSS_S_BAD_SIG) + {GSS_S_BAD_SIG, NT_STATUS_ACCESS_DENIED}, +#endif +#if defined(GSS_S_NO_CRED) + {GSS_S_NO_CRED, NT_STATUS_ACCESS_DENIED}, +#endif +#if defined(GSS_S_NO_CONTEXT) + {GSS_S_NO_CONTEXT, NT_STATUS_ACCESS_DENIED}, +#endif +#if defined(GSS_S_DEFECTIVE_TOKEN) + {GSS_S_DEFECTIVE_TOKEN, NT_STATUS_ACCESS_DENIED}, +#endif +#if defined(GSS_S_DEFECTIVE_CREDENTIAL) + {GSS_S_DEFECTIVE_CREDENTIAL, NT_STATUS_ACCESS_DENIED}, +#endif +#if defined(GSS_S_CREDENTIALS_EXPIRED) + {GSS_S_CREDENTIALS_EXPIRED, NT_STATUS_PASSWORD_EXPIRED}, +#endif +#if defined(GSS_S_CONTEXT_EXPIRED) + {GSS_S_CONTEXT_EXPIRED, NT_STATUS_PASSWORD_EXPIRED}, +#endif +#if defined(GSS_S_BAD_QOP) + {GSS_S_BAD_QOP, NT_STATUS_ACCESS_DENIED}, +#endif +#if defined(GSS_S_UNAUTHORIZED) + {GSS_S_UNAUTHORIZED, NT_STATUS_ACCESS_DENIED}, +#endif +#if defined(GSS_S_UNAVAILABLE) + {GSS_S_UNAVAILABLE, NT_STATUS_UNSUCCESSFUL}, +#endif +#if defined(GSS_S_BAD_NAMETYPE) + {GSS_S_DUPLICATE_ELEMENT, NT_STATUS_INVALID_PARAMETER}, +#endif +#if defined(GSS_S_BAD_NAMETYPE) + {GSS_S_NAME_NOT_MN, NT_STATUS_INVALID_PARAMETER}, +#endif + { 0, NT_STATUS_OK } +}; + +/********************************************************************* + Map an NT error code from a gssapi error code. +*********************************************************************/ + +NTSTATUS map_nt_error_from_gss(uint32 gss_maj, uint32 minor) +{ + int i = 0; + + if (gss_maj == GSS_S_COMPLETE) { + return NT_STATUS_OK; + } + + if (gss_maj == GSS_S_FAILURE) { + return map_nt_error_from_unix((int)minor); + } + + /* Look through list */ + while(gss_to_ntstatus_errormap[i].gss_err != 0) { + if (gss_to_ntstatus_errormap[i].gss_err == gss_maj) { + return gss_to_ntstatus_errormap[i].ntstatus; + } + i++; + } + + /* Default return */ + return NT_STATUS_ACCESS_DENIED; +} +#endif -- cgit From 9812a7e32e515315302d3040a4145592640de7f7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 18 Apr 2007 00:34:10 +0000 Subject: r22327: Finish the gss-spnego part of the seal code. Now for testing.... Jeremy. (This used to be commit 1c1f5360b67792f14b50835a2c5a4d4ac68aca8f) --- source3/libsmb/errormap.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index a78b0af81a..97bef001fb 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -1652,6 +1652,10 @@ NTSTATUS map_nt_error_from_gss(uint32 gss_maj, uint32 minor) return NT_STATUS_OK; } + if (gss_maj == GSS_S_CONTINUE_NEEDED) { + return NT_STATUS_MORE_PROCESSING_REQUIRED; + } + if (gss_maj == GSS_S_FAILURE) { return map_nt_error_from_unix((int)minor); } -- cgit From 383cc1fa1c472bacd2dc77b05e8c90dc82f3bbde Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 19 Apr 2007 00:45:01 +0000 Subject: r22353: Fix bad #ifdefs. Jeremy. (This used to be commit 9173c846b11c587e04a70ede387cd4a15173e4f2) --- source3/libsmb/errormap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 97bef001fb..33b75eece0 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -1631,10 +1631,10 @@ static const struct { #if defined(GSS_S_UNAVAILABLE) {GSS_S_UNAVAILABLE, NT_STATUS_UNSUCCESSFUL}, #endif -#if defined(GSS_S_BAD_NAMETYPE) +#if defined(GSS_S_DUPLICATE_ELEMENT) {GSS_S_DUPLICATE_ELEMENT, NT_STATUS_INVALID_PARAMETER}, #endif -#if defined(GSS_S_BAD_NAMETYPE) +#if defined(GSS_S_NAME_NOT_MN) {GSS_S_NAME_NOT_MN, NT_STATUS_INVALID_PARAMETER}, #endif { 0, NT_STATUS_OK } -- cgit From 6426d8b4a0fceb352641e936e632bf5bb0f84525 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 29 May 2007 19:09:38 +0000 Subject: r23224: Move map_nt_error_from_unix to lib/errmap_unix.c. This function is useful even in binaries that don't link in libsmb (This used to be commit 52545d119277b42a46d13b5b031c85f47d96b84c) --- source3/libsmb/errormap.c | 63 ----------------------------------------------- 1 file changed, 63 deletions(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 33b75eece0..bb4154ee95 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -1505,69 +1505,6 @@ WERROR ntstatus_to_werror(NTSTATUS error) return W_ERROR(NT_STATUS_V(error) & 0xffff); } -/* Mapping between Unix, DOS and NT error numbers */ - -const struct unix_error_map unix_dos_nt_errmap[] = { - { EPERM, ERRDOS, ERRnoaccess, NT_STATUS_ACCESS_DENIED }, - { EACCES, ERRDOS, ERRnoaccess, NT_STATUS_ACCESS_DENIED }, - { ENOENT, ERRDOS, ERRbadfile, NT_STATUS_OBJECT_NAME_NOT_FOUND }, - { ENOTDIR, ERRDOS, ERRbadpath, NT_STATUS_NOT_A_DIRECTORY }, - { EIO, ERRHRD, ERRgeneral, NT_STATUS_IO_DEVICE_ERROR }, - { EBADF, ERRSRV, ERRsrverror, NT_STATUS_INVALID_HANDLE }, - { EINVAL, ERRSRV, ERRsrverror, NT_STATUS_INVALID_HANDLE }, - { EEXIST, ERRDOS, ERRfilexists, NT_STATUS_OBJECT_NAME_COLLISION}, - { ENFILE, ERRDOS, ERRnofids, NT_STATUS_TOO_MANY_OPENED_FILES }, - { EMFILE, ERRDOS, ERRnofids, NT_STATUS_TOO_MANY_OPENED_FILES }, - { ENOSPC, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL }, - { ENOMEM, ERRDOS, ERRnomem, NT_STATUS_NO_MEMORY }, - { EISDIR, ERRDOS, ERRnoaccess, NT_STATUS_FILE_IS_A_DIRECTORY}, - { EMLINK, ERRDOS, ERRgeneral, NT_STATUS_TOO_MANY_LINKS }, -#ifdef EDQUOT - { EDQUOT, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL }, /* Windows apps need this, not NT_STATUS_QUOTA_EXCEEDED */ -#endif -#ifdef ENOTEMPTY - { ENOTEMPTY, ERRDOS, ERRnoaccess, NT_STATUS_DIRECTORY_NOT_EMPTY }, -#endif -#ifdef EXDEV - { EXDEV, ERRDOS, ERRdiffdevice, NT_STATUS_NOT_SAME_DEVICE }, -#endif -#ifdef EROFS - { EROFS, ERRHRD, ERRnowrite, NT_STATUS_ACCESS_DENIED }, -#endif -#ifdef ENAMETOOLONG - { ENAMETOOLONG, ERRDOS, 206, NT_STATUS_OBJECT_NAME_INVALID }, -#endif -#ifdef EFBIG - { EFBIG, ERRHRD, ERRdiskfull, NT_STATUS_DISK_FULL }, -#endif -#ifdef ENOBUFS - { ENOBUFS, ERRDOS, ERRnomem, NT_STATUS_INSUFFICIENT_RESOURCES }, -#endif - { 0, 0, 0, NT_STATUS_OK } -}; - -/********************************************************************* - Map an NT error code from a Unix error code. -*********************************************************************/ - -NTSTATUS map_nt_error_from_unix(int unix_error) -{ - int i = 0; - - if (unix_error == 0) - return NT_STATUS_OK; - - /* Look through list */ - while(unix_dos_nt_errmap[i].unix_error != 0) { - if (unix_dos_nt_errmap[i].unix_error == unix_error) - return unix_dos_nt_errmap[i].nt_error; - i++; - } - - /* Default return */ - return NT_STATUS_ACCESS_DENIED; -} - #if defined(HAVE_GSSAPI) /******************************************************************************* Map between gssapi errors and NT status. I made these up :-(. JRA. -- cgit From d824b98f80ba186030cbb70b3a1e5daf80469ecd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 9 Jul 2007 19:25:36 +0000 Subject: r23779: Change from v2 or later to v3 or later. Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3) --- source3/libsmb/errormap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index bb4154ee95..1de7115c8a 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -8,7 +8,7 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, -- cgit From 153cfb9c83534b09f15cc16205d7adb19b394928 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 05:23:25 +0000 Subject: r23801: The FSF has moved around a lot. This fixes their Mass Ave address. (This used to be commit 87c91e4362c51819032bfbebbb273c52e203b227) --- source3/libsmb/errormap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 1de7115c8a..412126eeca 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -17,8 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program; if not, see . */ #include "includes.h" -- cgit From e5a951325a6cac8567af3a66de6d2df577508ae4 Mon Sep 17 00:00:00 2001 From: "Gerald (Jerry) Carter" Date: Wed, 10 Oct 2007 15:34:30 -0500 Subject: [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch. (This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab) --- source3/libsmb/errormap.c | 106 ---------------------------------------------- 1 file changed, 106 deletions(-) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index 412126eeca..ce826ae999 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -4,7 +4,6 @@ * Copyright (C) Andrew Tridgell 2001 * Copyright (C) Andrew Bartlett 2001 * Copyright (C) Tim Potter 2000 - * Copyright (C) Jeremy Allison 2007 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1503,108 +1502,3 @@ WERROR ntstatus_to_werror(NTSTATUS error) /* a lame guess */ return W_ERROR(NT_STATUS_V(error) & 0xffff); } - -#if defined(HAVE_GSSAPI) -/******************************************************************************* - Map between gssapi errors and NT status. I made these up :-(. JRA. -*******************************************************************************/ - -static const struct { - unsigned long gss_err; - NTSTATUS ntstatus; -} gss_to_ntstatus_errormap[] = { -#if defined(GSS_S_CALL_INACCESSIBLE_READ) - {GSS_S_CALL_INACCESSIBLE_READ, NT_STATUS_INVALID_PARAMETER}, -#endif -#if defined(GSS_S_CALL_INACCESSIBLE_WRITE) - {GSS_S_CALL_INACCESSIBLE_WRITE, NT_STATUS_INVALID_PARAMETER}, -#endif -#if defined(GSS_S_CALL_BAD_STRUCTURE) - {GSS_S_CALL_BAD_STRUCTURE, NT_STATUS_INVALID_PARAMETER}, -#endif -#if defined(GSS_S_BAD_MECH) - {GSS_S_BAD_MECH, NT_STATUS_INVALID_PARAMETER}, -#endif -#if defined(GSS_S_BAD_NAME) - {GSS_S_BAD_NAME, NT_STATUS_INVALID_ACCOUNT_NAME}, -#endif -#if defined(GSS_S_BAD_NAMETYPE) - {GSS_S_BAD_NAMETYPE, NT_STATUS_INVALID_PARAMETER}, -#endif -#if defined(GSS_S_BAD_BINDINGS) - {GSS_S_BAD_BINDINGS, NT_STATUS_INVALID_PARAMETER}, -#endif -#if defined(GSS_S_BAD_STATUS) - {GSS_S_BAD_STATUS, NT_STATUS_UNSUCCESSFUL}, -#endif -#if defined(GSS_S_BAD_SIG) - {GSS_S_BAD_SIG, NT_STATUS_ACCESS_DENIED}, -#endif -#if defined(GSS_S_NO_CRED) - {GSS_S_NO_CRED, NT_STATUS_ACCESS_DENIED}, -#endif -#if defined(GSS_S_NO_CONTEXT) - {GSS_S_NO_CONTEXT, NT_STATUS_ACCESS_DENIED}, -#endif -#if defined(GSS_S_DEFECTIVE_TOKEN) - {GSS_S_DEFECTIVE_TOKEN, NT_STATUS_ACCESS_DENIED}, -#endif -#if defined(GSS_S_DEFECTIVE_CREDENTIAL) - {GSS_S_DEFECTIVE_CREDENTIAL, NT_STATUS_ACCESS_DENIED}, -#endif -#if defined(GSS_S_CREDENTIALS_EXPIRED) - {GSS_S_CREDENTIALS_EXPIRED, NT_STATUS_PASSWORD_EXPIRED}, -#endif -#if defined(GSS_S_CONTEXT_EXPIRED) - {GSS_S_CONTEXT_EXPIRED, NT_STATUS_PASSWORD_EXPIRED}, -#endif -#if defined(GSS_S_BAD_QOP) - {GSS_S_BAD_QOP, NT_STATUS_ACCESS_DENIED}, -#endif -#if defined(GSS_S_UNAUTHORIZED) - {GSS_S_UNAUTHORIZED, NT_STATUS_ACCESS_DENIED}, -#endif -#if defined(GSS_S_UNAVAILABLE) - {GSS_S_UNAVAILABLE, NT_STATUS_UNSUCCESSFUL}, -#endif -#if defined(GSS_S_DUPLICATE_ELEMENT) - {GSS_S_DUPLICATE_ELEMENT, NT_STATUS_INVALID_PARAMETER}, -#endif -#if defined(GSS_S_NAME_NOT_MN) - {GSS_S_NAME_NOT_MN, NT_STATUS_INVALID_PARAMETER}, -#endif - { 0, NT_STATUS_OK } -}; - -/********************************************************************* - Map an NT error code from a gssapi error code. -*********************************************************************/ - -NTSTATUS map_nt_error_from_gss(uint32 gss_maj, uint32 minor) -{ - int i = 0; - - if (gss_maj == GSS_S_COMPLETE) { - return NT_STATUS_OK; - } - - if (gss_maj == GSS_S_CONTINUE_NEEDED) { - return NT_STATUS_MORE_PROCESSING_REQUIRED; - } - - if (gss_maj == GSS_S_FAILURE) { - return map_nt_error_from_unix((int)minor); - } - - /* Look through list */ - while(gss_to_ntstatus_errormap[i].gss_err != 0) { - if (gss_to_ntstatus_errormap[i].gss_err == gss_maj) { - return gss_to_ntstatus_errormap[i].ntstatus; - } - i++; - } - - /* Default return */ - return NT_STATUS_ACCESS_DENIED; -} -#endif -- cgit From afc93255d183eefb68e45b8ec6275f6a62cf9795 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 26 Dec 2007 17:12:36 -0800 Subject: Add SMB encryption. Still fixing client decrypt but negotiation works. Jeremy. (This used to be commit d78045601af787731f0737b8627450018902b104) --- source3/libsmb/errormap.c | 105 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) (limited to 'source3/libsmb/errormap.c') diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c index ce826ae999..4ec30f7e17 100644 --- a/source3/libsmb/errormap.c +++ b/source3/libsmb/errormap.c @@ -1502,3 +1502,108 @@ WERROR ntstatus_to_werror(NTSTATUS error) /* a lame guess */ return W_ERROR(NT_STATUS_V(error) & 0xffff); } + +#if defined(HAVE_GSSAPI) +/******************************************************************************* + Map between gssapi errors and NT status. I made these up :-(. JRA. +*******************************************************************************/ + +static const struct { + unsigned long gss_err; + NTSTATUS ntstatus; +} gss_to_ntstatus_errormap[] = { +#if defined(GSS_S_CALL_INACCESSIBLE_READ) + {GSS_S_CALL_INACCESSIBLE_READ, NT_STATUS_INVALID_PARAMETER}, +#endif +#if defined(GSS_S_CALL_INACCESSIBLE_WRITE) + {GSS_S_CALL_INACCESSIBLE_WRITE, NT_STATUS_INVALID_PARAMETER}, +#endif +#if defined(GSS_S_CALL_BAD_STRUCTURE) + {GSS_S_CALL_BAD_STRUCTURE, NT_STATUS_INVALID_PARAMETER}, +#endif +#if defined(GSS_S_BAD_MECH) + {GSS_S_BAD_MECH, NT_STATUS_INVALID_PARAMETER}, +#endif +#if defined(GSS_S_BAD_NAME) + {GSS_S_BAD_NAME, NT_STATUS_INVALID_ACCOUNT_NAME}, +#endif +#if defined(GSS_S_BAD_NAMETYPE) + {GSS_S_BAD_NAMETYPE, NT_STATUS_INVALID_PARAMETER}, +#endif +#if defined(GSS_S_BAD_BINDINGS) + {GSS_S_BAD_BINDINGS, NT_STATUS_INVALID_PARAMETER}, +#endif +#if defined(GSS_S_BAD_STATUS) + {GSS_S_BAD_STATUS, NT_STATUS_UNSUCCESSFUL}, +#endif +#if defined(GSS_S_BAD_SIG) + {GSS_S_BAD_SIG, NT_STATUS_ACCESS_DENIED}, +#endif +#if defined(GSS_S_NO_CRED) + {GSS_S_NO_CRED, NT_STATUS_ACCESS_DENIED}, +#endif +#if defined(GSS_S_NO_CONTEXT) + {GSS_S_NO_CONTEXT, NT_STATUS_ACCESS_DENIED}, +#endif +#if defined(GSS_S_DEFECTIVE_TOKEN) + {GSS_S_DEFECTIVE_TOKEN, NT_STATUS_ACCESS_DENIED}, +#endif +#if defined(GSS_S_DEFECTIVE_CREDENTIAL) + {GSS_S_DEFECTIVE_CREDENTIAL, NT_STATUS_ACCESS_DENIED}, +#endif +#if defined(GSS_S_CREDENTIALS_EXPIRED) + {GSS_S_CREDENTIALS_EXPIRED, NT_STATUS_PASSWORD_EXPIRED}, +#endif +#if defined(GSS_S_CONTEXT_EXPIRED) + {GSS_S_CONTEXT_EXPIRED, NT_STATUS_PASSWORD_EXPIRED}, +#endif +#if defined(GSS_S_BAD_QOP) + {GSS_S_BAD_QOP, NT_STATUS_ACCESS_DENIED}, +#endif +#if defined(GSS_S_UNAUTHORIZED) + {GSS_S_UNAUTHORIZED, NT_STATUS_ACCESS_DENIED}, +#endif +#if defined(GSS_S_UNAVAILABLE) + {GSS_S_UNAVAILABLE, NT_STATUS_UNSUCCESSFUL}, +#endif +#if defined(GSS_S_DUPLICATE_ELEMENT) + {GSS_S_DUPLICATE_ELEMENT, NT_STATUS_INVALID_PARAMETER}, +#endif +#if defined(GSS_S_NAME_NOT_MN) + {GSS_S_NAME_NOT_MN, NT_STATUS_INVALID_PARAMETER}, +#endif + { 0, NT_STATUS_OK } +}; + +/********************************************************************* + Map an NT error code from a gssapi error code. +*********************************************************************/ + +NTSTATUS map_nt_error_from_gss(uint32 gss_maj, uint32 minor) +{ + int i = 0; + + if (gss_maj == GSS_S_COMPLETE) { + return NT_STATUS_OK; + } + + if (gss_maj == GSS_S_CONTINUE_NEEDED) { + return NT_STATUS_MORE_PROCESSING_REQUIRED; + } + + if (gss_maj == GSS_S_FAILURE) { + return map_nt_error_from_unix((int)minor); + } + + /* Look through list */ + while(gss_to_ntstatus_errormap[i].gss_err != 0) { + if (gss_to_ntstatus_errormap[i].gss_err == gss_maj) { + return gss_to_ntstatus_errormap[i].ntstatus; + } + i++; + } + + /* Default return */ + return NT_STATUS_ACCESS_DENIED; +} +#endif -- cgit