summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-11-19 14:02:22 +0100
committerStefan Metzmacher <metze@samba.org>2011-11-20 16:46:45 +0100
commit005798fa0ba118ba668e378063f778fa0438ab4e (patch)
tree297c22e3502abc8249d3f642fded9356f8c2d1f8 /source3/smbd
parentd3ded49b06bcba690eeabfdb97a004d700fdfe5e (diff)
downloadsamba-005798fa0ba118ba668e378063f778fa0438ab4e.tar.gz
samba-005798fa0ba118ba668e378063f778fa0438ab4e.tar.bz2
samba-005798fa0ba118ba668e378063f778fa0438ab4e.zip
s3:smb2_negprot: add support for SMB2_22
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Sun Nov 20 16:46:45 CET 2011 on sn-devel-104
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/smb2_negprot.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/smbd/smb2_negprot.c b/source3/smbd/smb2_negprot.c
index ba55662094..61d20082d8 100644
--- a/source3/smbd/smb2_negprot.c
+++ b/source3/smbd/smb2_negprot.c
@@ -119,6 +119,21 @@ NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req)
indyn = (const uint8_t *)req->in.vector[i+2].iov_base;
for (c=0; protocol == PROTOCOL_NONE && c < dialect_count; c++) {
+ if (lp_maxprotocol() < PROTOCOL_SMB2_22) {
+ break;
+ }
+ if (lp_minprotocol() > PROTOCOL_SMB2_22) {
+ break;
+ }
+
+ dialect = SVAL(indyn, c*2);
+ if (dialect == SMB2_DIALECT_REVISION_222) {
+ protocol = PROTOCOL_SMB2_22;
+ break;
+ }
+ }
+
+ for (c=0; protocol == PROTOCOL_NONE && c < dialect_count; c++) {
if (lp_maxprotocol() < PROTOCOL_SMB2_10) {
break;
}