summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-01-02 18:14:59 +0100
committerVolker Lendecke <vl@samba.org>2010-01-03 11:38:22 +0100
commit3f25fb567783e2da5d9685e3ee81a0f32c85b416 (patch)
tree6760833940d06e789377916daa5705ace9242cbd
parenta321dd91a4a3bf79705144b299bee4428c9aa5da (diff)
downloadsamba-3f25fb567783e2da5d9685e3ee81a0f32c85b416.tar.gz
samba-3f25fb567783e2da5d9685e3ee81a0f32c85b416.tar.bz2
samba-3f25fb567783e2da5d9685e3ee81a0f32c85b416.zip
s3: NT_STATUS_MORE_PROCESSING_REQUIRED is a valid sesssetup return value
-rw-r--r--source3/libsmb/async_smb.c32
1 files changed, 23 insertions, 9 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index 8b9cf091c6..f5000e4730 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -815,16 +815,30 @@ NTSTATUS cli_smb_recv(struct tevent_req *req, uint8_t min_wct,
status = cli_pull_error((char *)state->inbuf);
- if (!have_andx_command((char *)state->inbuf, wct_ofs)
- && NT_STATUS_IS_ERR(status)) {
- /*
- * The last command takes the error code. All further commands
- * down the requested chain will get a
- * NT_STATUS_REQUEST_ABORTED.
- */
- return status;
+ if (!have_andx_command((char *)state->inbuf, wct_ofs)) {
+
+ if ((cmd == SMBsesssetupX)
+ && NT_STATUS_EQUAL(
+ status, NT_STATUS_MORE_PROCESSING_REQUIRED)) {
+ /*
+ * NT_STATUS_MORE_PROCESSING_REQUIRED is a
+ * valid return code for session setup
+ */
+ goto no_err;
+ }
+
+ if (NT_STATUS_IS_ERR(status)) {
+ /*
+ * The last command takes the error code. All
+ * further commands down the requested chain
+ * will get a NT_STATUS_REQUEST_ABORTED.
+ */
+ return status;
+ }
}
+no_err:
+
wct = CVAL(state->inbuf, wct_ofs);
bytes_offset = wct_ofs + 1 + wct * sizeof(uint16_t);
num_bytes = SVAL(state->inbuf, bytes_offset);
@@ -856,7 +870,7 @@ NTSTATUS cli_smb_recv(struct tevent_req *req, uint8_t min_wct,
*pbytes = (uint8_t *)state->inbuf + bytes_offset + 2;
}
- return NT_STATUS_OK;
+ return status;
}
size_t cli_smb_wct_ofs(struct tevent_req **reqs, int num_reqs)