1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

Treat RAP codes differently.

Jeremy.
This commit is contained in:
Jeremy Allison
-
parent 3c68b94199
commit 919b11a787

View File

@ -73,12 +73,19 @@ char *cli_errstr(struct cli_state *cli)
int i;
/* Case #1: RAP error */
if (cli->rap_error) {
for (i = 0; rap_errmap[i].message != NULL; i++) {
if (rap_errmap[i].err == cli->rap_error) {
return rap_errmap[i].message;
}
}
slprintf(cli_error_message, sizeof(cli_error_message) - 1, "RAP code %d",
cli->rap_error);
return cli_error_message;
}
/* Case #2: 32-bit NT errors */
if (flgs2 & FLAGS2_32_BIT_ERROR_CODES) {
NTSTATUS status = NT_STATUS(IVAL(cli->inbuf,smb_rcls));
@ -90,13 +97,7 @@ char *cli_errstr(struct cli_state *cli)
/* Case #3: SMB error */
if (errclass != 0)
return cli_smb_errstr(cli);
slprintf(cli_error_message, sizeof(cli_error_message) - 1, "code %d",
cli->rap_error);
return cli_error_message;
}