summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorBjörn Baumbach <bb@sernet.de>2011-11-16 14:45:01 +0100
committerStefan Metzmacher <metze@samba.org>2011-11-16 19:02:12 +0100
commite4934a1e427ec01576beb4fe21d2775b75adeb0b (patch)
tree568508e1afb30acb97f7d967a137475e34dea8d2 /source3
parentaf1a2eecce1155618173aa2c9a8d9f687082a449 (diff)
downloadsamba-e4934a1e427ec01576beb4fe21d2775b75adeb0b.tar.gz
samba-e4934a1e427ec01576beb4fe21d2775b75adeb0b.tar.bz2
samba-e4934a1e427ec01576beb4fe21d2775b75adeb0b.zip
s3-libsmb: introduce option to disable dos error mapping
Signed-off-by: Stefan Metzmacher <metze@samba.org>
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;