summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorZach Loafman <zachary.loafman@isilon.com>2009-03-12 08:32:58 -0700
committerTim Prouty <tprouty@samba.org>2009-03-17 13:43:27 -0700
commit6c08e329fa9396474b200fe7593d4a5c2082930a (patch)
tree8a5cb3514fadf57fa1c8da0123b6ca5640e80ad3 /source4/libcli
parentb29c69f45953bf099f1d4f6e6abd5726f5ac793e (diff)
downloadsamba-6c08e329fa9396474b200fe7593d4a5c2082930a.tar.gz
samba-6c08e329fa9396474b200fe7593d4a5c2082930a.tar.bz2
samba-6c08e329fa9396474b200fe7593d4a5c2082930a.zip
s4 libcli: Add SMB2.1 dialect to libcli
Negotiate 2.1 if possible, leave negotiate results in transport->negotiate.dialect_revision.
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/smb2/connect.c3
-rw-r--r--source4/libcli/smb2/smb2.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/source4/libcli/smb2/connect.c b/source4/libcli/smb2/connect.c
index 11bec42737..3fd9a38e01 100644
--- a/source4/libcli/smb2/connect.c
+++ b/source4/libcli/smb2/connect.c
@@ -108,6 +108,7 @@ static void continue_negprot(struct smb2_request *req)
transport->negotiate.system_time = state->negprot.out.system_time;
transport->negotiate.server_start_time = state->negprot.out.server_start_time;
transport->negotiate.security_mode = state->negprot.out.security_mode;
+ transport->negotiate.dialect_revision = state->negprot.out.dialect_revision;
switch (transport->options.signing) {
case SMB_SIGNING_OFF:
@@ -187,7 +188,7 @@ static void continue_socket(struct composite_context *creq)
state->negprot.in.capabilities = 0;
unix_to_nt_time(&state->negprot.in.start_time, time(NULL));
dialects[0] = SMB2_DIALECT_REVISION;
- dialects[1] = 0;
+ dialects[1] = SMB21_DIALECT_REVISION;
state->negprot.in.dialects = dialects;
req = smb2_negprot_send(transport, &state->negprot);
diff --git a/source4/libcli/smb2/smb2.h b/source4/libcli/smb2/smb2.h
index d1d5b842c3..3cc3ec2f25 100644
--- a/source4/libcli/smb2/smb2.h
+++ b/source4/libcli/smb2/smb2.h
@@ -35,6 +35,7 @@ struct smb2_negotiate {
NTTIME system_time;
NTTIME server_start_time;
uint16_t security_mode;
+ uint16_t dialect_revision;
};
/* this is the context for the smb2 transport layer */
@@ -226,8 +227,9 @@ struct smb2_request {
#define SMB2_MAGIC 0x424D53FE /* 0xFE 'S' 'M' 'B' */
-/* the dialect we support */
+/* the dialects we support */
#define SMB2_DIALECT_REVISION 0x202
+#define SMB21_DIALECT_REVISION 0x210
/* SMB2 negotiate security_mode */
#define SMB2_NEGOTIATE_SIGNING_ENABLED 0x01