diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-02-14 17:11:36 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-02-14 17:11:36 +1100 |
commit | b640f475be9b0f83e7812a5c7756344c5891cba3 (patch) | |
tree | eb7c955f31379ae243f89004ff872054d80b764d /source4/smb_server/smb2/negprot.c | |
parent | 4a04a5e620a4666fc123d04cb96ef391de72c469 (diff) | |
download | samba-b640f475be9b0f83e7812a5c7756344c5891cba3.tar.gz samba-b640f475be9b0f83e7812a5c7756344c5891cba3.tar.bz2 samba-b640f475be9b0f83e7812a5c7756344c5891cba3.zip |
updated SMB2 code for getinfo according to WSPP docs
- Updated getinfo structures and field names
- also updated the protocol revision number handling to reflect
new docs
(This used to be commit 3aaa2e86d94675c6c68d66d75292c3e34bfbc81b)
Diffstat (limited to 'source4/smb_server/smb2/negprot.c')
-rw-r--r-- | source4/smb_server/smb2/negprot.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/smb_server/smb2/negprot.c b/source4/smb_server/smb2/negprot.c index 578eadbe8f..5bbd7f7d5e 100644 --- a/source4/smb_server/smb2/negprot.c +++ b/source4/smb_server/smb2/negprot.c @@ -93,12 +93,14 @@ static NTSTATUS smb2srv_negprot_backend(struct smb2srv_request *req, struct smb2 struct timeval current_time; struct timeval boot_time; - /* we only do dialect 0 for now */ + /* we only do one dialect for now */ if (io->in.dialect_count < 1) { return NT_STATUS_NOT_SUPPORTED; } - if (io->in.dialects[0] != 0) { + if (io->in.dialects[0] != 0 && + io->in.dialects[0] != SMB2_DIALECT_REVISION) { DEBUG(0,("Got unexpected SMB2 dialect %u\n", io->in.dialects[0])); + return NT_STATUS_NOT_SUPPORTED; } req->smb_conn->negotiate.protocol = PROTOCOL_SMB2; @@ -108,8 +110,7 @@ static NTSTATUS smb2srv_negprot_backend(struct smb2srv_request *req, struct smb2 ZERO_STRUCT(io->out); io->out.security_mode = 0; /* no signing yet */ - /* choose the first dialect offered for now */ - io->out.dialect_revision = io->in.dialects[0]; + io->out.dialect_revision = SMB2_DIALECT_REVISION; io->out.capabilities = 0; io->out.max_transact_size = 0x10000; io->out.max_read_size = 0x10000; |