summaryrefslogtreecommitdiffstats
path: root/source4/libcli/smb2
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-06-30 11:07:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:40 -0500
commit63d0c5a0570908cee293cca3300a4b50f48f8afd (patch)
tree47883cd658049f08503add7bf497ae132e5b5929 /source4/libcli/smb2
parent4357d9f5deec7164fcb673bebe432fb7e5301cea (diff)
downloadsamba-63d0c5a0570908cee293cca3300a4b50f48f8afd.tar.gz
samba-63d0c5a0570908cee293cca3300a4b50f48f8afd.tar.xz
samba-63d0c5a0570908cee293cca3300a4b50f48f8afd.zip
r16708: the packet format of SMB2 SessionSetup has changed,
there're 8 more unknown bytes... Note: - vista-CTP also support this as a server, but uses the old format as client - but vista-beta2 only uses and accept the new format metze (This used to be commit b3bdd4afdefc9ad3550f86a0aa6e6c90bf8ab416)
Diffstat (limited to 'source4/libcli/smb2')
-rw-r--r--source4/libcli/smb2/session.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source4/libcli/smb2/session.c b/source4/libcli/smb2/session.c
index 83e6d1ae00f..7518a3d6d3b 100644
--- a/source4/libcli/smb2/session.c
+++ b/source4/libcli/smb2/session.c
@@ -69,11 +69,11 @@ struct smb2_request *smb2_session_setup_send(struct smb2_session *session,
NTSTATUS status;
req = smb2_request_init(session->transport, SMB2_OP_SESSSETUP,
- 0x10, True, io->in.secblob.length);
+ 0x18, True, io->in.secblob.length);
if (req == NULL) return NULL;
SBVAL(req->out.hdr, SMB2_HDR_UID, session->uid);
- SSVAL(req->out.body, 0x02, 0); /* pad */
+ SSVAL(req->out.body, 0x02, io->in._pad); /* pad */
SIVAL(req->out.body, 0x04, io->in.unknown2);
SIVAL(req->out.body, 0x08, io->in.unknown3);
@@ -84,6 +84,7 @@ struct smb2_request *smb2_session_setup_send(struct smb2_session *session,
talloc_free(req);
return NULL;
}
+ SBVAL(req->out.body, 0x10, io->in.unknown4);
smb2_transport_send(req);
@@ -209,9 +210,10 @@ struct composite_context *smb2_session_setup_spnego_send(struct smb2_session *se
c->event_ctx = session->transport->socket->event.ctx;
ZERO_STRUCT(state->io);
- state->io.in._pad = 0x0;
- state->io.in.unknown2 = 0xF;
- state->io.in.unknown3 = 0x00;
+ state->io.in._pad = 0x0000;
+ state->io.in.unknown2 = 0x0000000F;
+ state->io.in.unknown3 = 0x00000000;
+ state->io.in.unknown4 = 0; /* uint64_t */
c->status = gensec_set_credentials(session->gensec, credentials);
if (!NT_STATUS_IS_OK(c->status)) {