summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/client.h1
-rw-r--r--source3/libsmb/async_smb.c3
-rw-r--r--source3/libsmb/clientgen.c1
3 files changed, 4 insertions, 1 deletions
diff --git a/source3/include/client.h b/source3/include/client.h
index 65da738e22..293138d574 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -44,6 +44,7 @@ struct cli_state {
struct cli_state *prev, *next;
int rap_error;
NTSTATUS raw_status; /* maybe via NT_STATUS_DOS() */
+ bool map_dos_errors;
/* The credentials used to open the cli_state connection. */
char *domain;
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index 08b6c3561e..574ca3b2ba 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -897,7 +897,8 @@ NTSTATUS cli_smb_recv(struct tevent_req *req,
}
state->cli->raw_status = cli_pull_raw_error(state->inbuf);
- if (NT_STATUS_IS_DOS(state->cli->raw_status)) {
+ if (NT_STATUS_IS_DOS(state->cli->raw_status) &&
+ state->cli->map_dos_errors) {
uint8_t eclass = NT_STATUS_DOS_CLASS(state->cli->raw_status);
uint16_t ecode = NT_STATUS_DOS_CODE(state->cli->raw_status);
/*
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index bc544afd32..215ad3fec4 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -208,6 +208,7 @@ struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx,
goto error;
}
cli->raw_status = NT_STATUS_INTERNAL_ERROR;
+ cli->map_dos_errors = true; /* remove this */
cli->timeout = 20000; /* Timeout is in milliseconds. */
cli->case_sensitive = false;