mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
s3-libsmb: introduce option to disable dos error mapping
Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
committed by
Stefan Metzmacher
parent
af1a2eecce
commit
e4934a1e42
@ -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;
|
||||
|
@ -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);
|
||||
/*
|
||||
|
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user