summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/libsmb/errormap.c17
-rw-r--r--source4/libcli/util/errormap.c18
2 files changed, 20 insertions, 15 deletions
diff --git a/source3/libsmb/errormap.c b/source3/libsmb/errormap.c
index bc9676bbff..d8c3cc0133 100644
--- a/source3/libsmb/errormap.c
+++ b/source3/libsmb/errormap.c
@@ -53,10 +53,16 @@
/* NT status -> dos error map */
static const struct {
- uint8 dos_class;
- uint32 dos_code;
+ uint8_t dos_class;
+ uint32_t dos_code;
NTSTATUS ntstatus;
} ntstatus_to_dos_map[] = {
+/*
+ * 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, ERRnofiles, NT_STATUS_NO_MORE_ENTRIES},
{ERRDOS, ERRgeneral, NT_STATUS_UNSUCCESSFUL},
{ERRDOS, ERRbadfunc, NT_STATUS_NOT_IMPLEMENTED},
{ERRDOS, 87, NT_STATUS_INVALID_INFO_CLASS},
@@ -105,11 +111,6 @@ 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, ERRnofiles, STATUS_NO_MORE_FILES},
{ERRDOS, ERRbadfid, NT_STATUS_OBJECT_TYPE_MISMATCH},
{ERRHRD, ERRgeneral, NT_STATUS_NONCONTINUABLE_EXCEPTION},
{ERRHRD, ERRgeneral, NT_STATUS_INVALID_DISPOSITION},
@@ -1448,7 +1449,7 @@ NTSTATUS dos_to_ntstatus(uint8 eclass, uint32 ecode)
/*****************************************************************************
convert a NT status code to a dos class/code
*****************************************************************************/
-void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode)
+void ntstatus_to_dos(NTSTATUS ntstatus, uint8_t *eclass, uint32_t *ecode)
{
int i;
if (NT_STATUS_IS_OK(ntstatus)) {
diff --git a/source4/libcli/util/errormap.c b/source4/libcli/util/errormap.c
index 962dc24a45..ef0d482388 100644
--- a/source4/libcli/util/errormap.c
+++ b/source4/libcli/util/errormap.c
@@ -49,6 +49,10 @@ static const struct {
uint32_t dos_code;
NTSTATUS ntstatus;
} ntstatus_to_dos_map[] = {
+/*
+ * 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, ERRnofiles, NT_STATUS_NO_MORE_ENTRIES},
{ERRDOS, ERRgeneral, NT_STATUS_UNSUCCESSFUL},
@@ -63,7 +67,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},
@@ -116,13 +120,13 @@ static const struct {
{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, 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},
@@ -142,7 +146,7 @@ static const struct {
{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, ERReasnotsupported, NT_STATUS_EAS_NOT_SUPPORTED},
{ERRDOS, 255, NT_STATUS_EA_TOO_LARGE},
{ERRHRD, ERRgeneral, NT_STATUS_NONEXISTENT_EA_ENTRY},
{ERRHRD, ERRgeneral, NT_STATUS_NO_EAS_ON_FILE},
@@ -335,7 +339,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},
@@ -404,7 +408,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},