git.samba.org
/
ddiss
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8209157
)
s3:smb2cli: check the response has the SMB2_HDR_FLAG_REDIRECT flag
author
Stefan Metzmacher
<metze@samba.org>
Sat, 17 Sep 2011 19:15:45 +0000
(21:15 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Sun, 18 Sep 2011 03:33:10 +0000
(
05:33
+0200)
metze
source3/libsmb/smb2cli_base.c
patch
|
blob
|
history
diff --git
a/source3/libsmb/smb2cli_base.c
b/source3/libsmb/smb2cli_base.c
index aff59e42129ff32b4d22e49bdd9262484462e857..612ae4aad8b0247fa3fe1d960eee85b1277bed8a 100644
(file)
--- a/
source3/libsmb/smb2cli_base.c
+++ b/
source3/libsmb/smb2cli_base.c
@@
-548,6
+548,7
@@
static void smb2cli_inbuf_received(struct tevent_req *subreq)
struct iovec *cur = &iov[i];
uint8_t *inhdr = (uint8_t *)cur[0].iov_base;
uint16_t opcode = SVAL(inhdr, SMB2_HDR_OPCODE);
+ uint32_t flags = IVAL(inhdr, SMB2_HDR_FLAGS);
uint64_t mid = BVAL(inhdr, SMB2_HDR_MESSAGE_ID);
uint16_t req_opcode;
@@
-576,6
+577,13
@@
static void smb2cli_inbuf_received(struct tevent_req *subreq)
return;
}
+ if (!(flags & SMB2_HDR_FLAG_REDIRECT)) {
+ status = NT_STATUS_INVALID_NETWORK_RESPONSE;
+ smb2cli_notify_pending(cli, status);
+ TALLOC_FREE(frame);
+ return;
+ }
+
smb2cli_req_unset_pending(req);
/*