summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-08-13 09:42:27 +0200
committerStefan Metzmacher <metze@samba.org>2008-08-14 13:13:49 +0200
commitbe0a45d865dbb78c0a82e6bcebebbbbdb4ecb2d1 (patch)
tree1e0fa91f7bedacf5f55e95f880d5d54de781f844 /source4
parent150d7a16236732abfe23082bdeef62d8e36beeb4 (diff)
downloadsamba-be0a45d865dbb78c0a82e6bcebebbbbdb4ecb2d1.tar.gz
samba-be0a45d865dbb78c0a82e6bcebebbbbdb4ecb2d1.tar.bz2
samba-be0a45d865dbb78c0a82e6bcebebbbbdb4ecb2d1.zip
libcli/smb2: async replies with STATUS_PENDING are not signed
metze (This used to be commit 3f6cbece4a199a42ad6583ea4bd4302629399625)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/smb2/transport.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/source4/libcli/smb2/transport.c b/source4/libcli/smb2/transport.c
index d9691bec7c..b946a102c8 100644
--- a/source4/libcli/smb2/transport.c
+++ b/source4/libcli/smb2/transport.c
@@ -235,6 +235,17 @@ static NTSTATUS smb2_transport_finish_recv(void *private, DATA_BLOB blob)
req->in.body_size = req->in.size - (SMB2_HDR_BODY+NBT_HDR_SIZE);
req->status = NT_STATUS(IVAL(hdr, SMB2_HDR_STATUS));
+ if ((flags & SMB2_HDR_FLAG_ASYNC) &&
+ NT_STATUS_EQUAL(req->status, STATUS_PENDING)) {
+ req->cancel.can_cancel = true;
+ req->cancel.pending_id = IVAL(hdr, SMB2_HDR_PID);
+ for (i=0; i< req->cancel.do_cancel; i++) {
+ smb2_cancel(req);
+ }
+ talloc_free(buffer);
+ return NT_STATUS_OK;
+ }
+
if (req->session && req->session->signing_active) {
status = smb2_check_signature(&req->in,
req->session->session_key);
@@ -244,19 +255,6 @@ static NTSTATUS smb2_transport_finish_recv(void *private, DATA_BLOB blob)
return status;
}
}
-
-
- if (NT_STATUS_EQUAL(req->status, STATUS_PENDING)) {
- if (flags & 0x00000002) {
- req->cancel.can_cancel = true;
- req->cancel.pending_id = IVAL(hdr, SMB2_HDR_PID);
- for (i=0; i< req->cancel.do_cancel; i++) {
- smb2_cancel(req);
- }
- }
- talloc_free(buffer);
- return NT_STATUS_OK;
- }
buffer_code = SVAL(req->in.body, 0);
req->in.body_fixed = (buffer_code & ~1);