summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Loafman <zachary.loafman@isilon.com>2009-03-18 10:36:59 -0700
committerTim Prouty <tprouty@samba.org>2009-03-18 11:03:33 -0700
commit8595f260ebec2bf06d24d68a8c2f96810647156b (patch)
treebc13c5878e6e7600f4b821d1e9f066a5827175f7
parent21391f7fbe6c92ba050462750571cda661f5fb8a (diff)
downloadsamba-8595f260ebec2bf06d24d68a8c2f96810647156b.tar.gz
samba-8595f260ebec2bf06d24d68a8c2f96810647156b.tar.bz2
samba-8595f260ebec2bf06d24d68a8c2f96810647156b.zip
s4 libcli: Add back Longhorn beta dialect as a constant
Also tweak how the dialect array and count is initialized.
-rw-r--r--source4/libcli/smb2/connect.c7
-rw-r--r--source4/libcli/smb2/smb2.h1
2 files changed, 4 insertions, 4 deletions
diff --git a/source4/libcli/smb2/connect.c b/source4/libcli/smb2/connect.c
index 3fd9a38e01..b522a56239 100644
--- a/source4/libcli/smb2/connect.c
+++ b/source4/libcli/smb2/connect.c
@@ -162,7 +162,8 @@ static void continue_socket(struct composite_context *creq)
struct smbcli_socket *sock;
struct smb2_transport *transport;
struct smb2_request *req;
- uint16_t dialects[2];
+ uint16_t dialects[3] = { SMB2_DIALECT_REVISION, SMB21_DIALECT_REVISION,
+ SMB2_LONGHORN_BETA_DIALECT_REVISION };
c->status = smbcli_sock_connect_recv(creq, state, &sock);
if (!composite_is_ok(c)) return;
@@ -171,7 +172,7 @@ static void continue_socket(struct composite_context *creq)
if (composite_nomem(transport, c)) return;
ZERO_STRUCT(state->negprot);
- state->negprot.in.dialect_count = 2;
+ state->negprot.in.dialect_count = sizeof(dialects) / sizeof(dialects[0]);
switch (transport->options.signing) {
case SMB_SIGNING_OFF:
state->negprot.in.security_mode = 0;
@@ -187,8 +188,6 @@ 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] = 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 3cc3ec2f25..7c07c84740 100644
--- a/source4/libcli/smb2/smb2.h
+++ b/source4/libcli/smb2/smb2.h
@@ -230,6 +230,7 @@ struct smb2_request {
/* the dialects we support */
#define SMB2_DIALECT_REVISION 0x202
#define SMB21_DIALECT_REVISION 0x210
+#define SMB2_LONGHORN_BETA_DIALECT_REVISION 0x0 /* early beta dialect */
/* SMB2 negotiate security_mode */
#define SMB2_NEGOTIATE_SIGNING_ENABLED 0x01