From 3e54c36fa459ec6f5e721b90ce4e4c1d0e31d85c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 11 Nov 2005 09:11:51 +0000 Subject: r11674: SMB2 tree connect now works. We do 2 session setups and 2 tree connects, giving the following output: Running SMB2-CONNECT Negprot reply: current_time = Fri Nov 11 20:10:42 2005 EST boot_time = Sat Nov 12 10:34:33 2005 EST Session setup gave UID 0x40000000071 Session setup gave UID 0x140000000075 Tree connect gave tid = 0x7500000001 Tree connect gave tid = 0x7500000005 SMB2-CONNECT took 0.049024 secs (This used to be commit a24a4c311005dec4c5638e9c7c10e5e2f9872f4d) --- source4/libcli/smb2/tcon.c | 112 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 source4/libcli/smb2/tcon.c (limited to 'source4/libcli/smb2/tcon.c') diff --git a/source4/libcli/smb2/tcon.c b/source4/libcli/smb2/tcon.c new file mode 100644 index 0000000000..7b13750cfe --- /dev/null +++ b/source4/libcli/smb2/tcon.c @@ -0,0 +1,112 @@ +/* + Unix SMB/CIFS implementation. + + SMB2 client tree handling + + Copyright (C) Andrew Tridgell 2005 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "includes.h" +#include "libcli/raw/libcliraw.h" +#include "libcli/smb2/smb2.h" +#include "libcli/smb2/smb2_calls.h" + +/* + initialise a smb2_session structure + */ +struct smb2_tree *smb2_tree_init(struct smb2_session *session, + TALLOC_CTX *parent_ctx, BOOL primary) +{ + struct smb2_tree *tree; + + tree = talloc_zero(parent_ctx, struct smb2_tree); + if (!session) { + return NULL; + } + if (primary) { + tree->session = talloc_steal(tree, session); + } else { + tree->session = talloc_reference(tree, session); + } + return tree; +} + +/* + send a tree connect +*/ +struct smb2_request *smb2_tree_connect_send(struct smb2_tree *tree, + struct smb2_tree_connect *io) +{ + struct smb2_request *req; + NTSTATUS status; + DATA_BLOB path; + + status = smb2_string_blob(tree, io->in.path, &path); + if (!NT_STATUS_IS_OK(status)) { + return NULL; + } + + req = smb2_request_init(tree->session->transport, SMB2_OP_TCON, + 0x8 + path.length); + if (req == NULL) return NULL; + + SBVAL(req->out.hdr, SMB2_HDR_UID, tree->session->uid); + SIVAL(req->out.body, 0x00, io->in.unknown1); + status = smb2_push_ofs_blob(req, req->out.body+0x04, path); + if (!NT_STATUS_IS_OK(status)) { + talloc_free(req); + return NULL; + } + + smb2_transport_send(req); + + return req; +} + + +/* + recv a tree connect reply +*/ +NTSTATUS smb2_tree_connect_recv(struct smb2_request *req, struct smb2_tree_connect *io) +{ + if (!smb2_request_receive(req) || + smb2_request_is_error(req)) { + return smb2_request_destroy(req); + } + + if (req->in.body_size < 0x10) { + return NT_STATUS_BUFFER_TOO_SMALL; + } + + io->out.tid = BVAL(req->in.hdr, SMB2_HDR_TID); + + io->out.unknown1 = IVAL(req->in.body, 0x00); + io->out.unknown2 = IVAL(req->in.body, 0x04); + io->out.unknown3 = IVAL(req->in.body, 0x08); + io->out.unknown4 = IVAL(req->in.body, 0x0C); + + return smb2_request_destroy(req); +} + +/* + sync session setup request +*/ +NTSTATUS smb2_tree_connect(struct smb2_tree *tree, struct smb2_tree_connect *io) +{ + struct smb2_request *req = smb2_tree_connect_send(tree, io); + return smb2_tree_connect_recv(req, io); +} -- cgit From 2e753f851885930000eadbd4b69660d85124c716 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 11 Nov 2005 12:37:16 +0000 Subject: r11679: opening/creating files in SMB2 now works. Lots of unknown parameters in the call tho. (This used to be commit 548fbd86b3b114493943b50669bdcba2f4ed87f2) --- source4/libcli/smb2/tcon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/libcli/smb2/tcon.c') diff --git a/source4/libcli/smb2/tcon.c b/source4/libcli/smb2/tcon.c index 7b13750cfe..b339d6473e 100644 --- a/source4/libcli/smb2/tcon.c +++ b/source4/libcli/smb2/tcon.c @@ -67,6 +67,7 @@ struct smb2_request *smb2_tree_connect_send(struct smb2_tree *tree, SBVAL(req->out.hdr, SMB2_HDR_UID, tree->session->uid); SIVAL(req->out.body, 0x00, io->in.unknown1); status = smb2_push_ofs_blob(req, req->out.body+0x04, path); + data_blob_free(&path); if (!NT_STATUS_IS_OK(status)) { talloc_free(req); return NULL; @@ -92,7 +93,7 @@ NTSTATUS smb2_tree_connect_recv(struct smb2_request *req, struct smb2_tree_conne return NT_STATUS_BUFFER_TOO_SMALL; } - io->out.tid = BVAL(req->in.hdr, SMB2_HDR_TID); + io->out.tid = IVAL(req->in.hdr, SMB2_HDR_TID); io->out.unknown1 = IVAL(req->in.body, 0x00); io->out.unknown2 = IVAL(req->in.body, 0x04); @@ -103,7 +104,7 @@ NTSTATUS smb2_tree_connect_recv(struct smb2_request *req, struct smb2_tree_conne } /* - sync session setup request + sync tree connect request */ NTSTATUS smb2_tree_connect(struct smb2_tree *tree, struct smb2_tree_connect *io) { -- cgit From b034156bd5920557ac175236dab113b971d72baf Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 11 Nov 2005 14:13:24 +0000 Subject: r11682: filled in access_mask in tcon reply (This used to be commit 173a213f915aa929cc2a6bfef06954e665b3d694) --- source4/libcli/smb2/tcon.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/libcli/smb2/tcon.c') diff --git a/source4/libcli/smb2/tcon.c b/source4/libcli/smb2/tcon.c index b339d6473e..88a2d0a67d 100644 --- a/source4/libcli/smb2/tcon.c +++ b/source4/libcli/smb2/tcon.c @@ -95,10 +95,10 @@ NTSTATUS smb2_tree_connect_recv(struct smb2_request *req, struct smb2_tree_conne io->out.tid = IVAL(req->in.hdr, SMB2_HDR_TID); - io->out.unknown1 = IVAL(req->in.body, 0x00); - io->out.unknown2 = IVAL(req->in.body, 0x04); - io->out.unknown3 = IVAL(req->in.body, 0x08); - io->out.unknown4 = IVAL(req->in.body, 0x0C); + io->out.unknown1 = IVAL(req->in.body, 0x00); + io->out.unknown2 = IVAL(req->in.body, 0x04); + io->out.unknown3 = IVAL(req->in.body, 0x08); + io->out.access_mask = IVAL(req->in.body, 0x0C); return smb2_request_destroy(req); } -- cgit From 91e1893741741de04b73a098495c697434105803 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 11 Nov 2005 23:27:47 +0000 Subject: r11691: added reply buffer code checks and oplock flags for create request/reply (This used to be commit 26ed781375c03958241d8c93324e04e948944d01) --- source4/libcli/smb2/tcon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/libcli/smb2/tcon.c') diff --git a/source4/libcli/smb2/tcon.c b/source4/libcli/smb2/tcon.c index 88a2d0a67d..f68987acf7 100644 --- a/source4/libcli/smb2/tcon.c +++ b/source4/libcli/smb2/tcon.c @@ -93,9 +93,11 @@ NTSTATUS smb2_tree_connect_recv(struct smb2_request *req, struct smb2_tree_conne return NT_STATUS_BUFFER_TOO_SMALL; } + SMB2_CHECK_BUFFER_CODE(req, 0x10); + io->out.tid = IVAL(req->in.hdr, SMB2_HDR_TID); - io->out.unknown1 = IVAL(req->in.body, 0x00); + io->out.unknown1 = SVAL(req->in.body, 0x02); io->out.unknown2 = IVAL(req->in.body, 0x04); io->out.unknown3 = IVAL(req->in.body, 0x08); io->out.access_mask = IVAL(req->in.body, 0x0C); -- cgit From de5d71aebe4e415fcebbfacb852b190498cbf7bf Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 14 Nov 2005 12:31:02 +0000 Subject: r11722: make the smb2_push/pull functions take a smb2_request_buffer and the pull ones also a TALLOC_CTX, then we can reuse this functions in the server later metze (This used to be commit 9b616516cae269f0870e9b9a9cecd8ee3f0a9095) --- source4/libcli/smb2/tcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/smb2/tcon.c') diff --git a/source4/libcli/smb2/tcon.c b/source4/libcli/smb2/tcon.c index f68987acf7..5e53e11634 100644 --- a/source4/libcli/smb2/tcon.c +++ b/source4/libcli/smb2/tcon.c @@ -66,7 +66,7 @@ struct smb2_request *smb2_tree_connect_send(struct smb2_tree *tree, SBVAL(req->out.hdr, SMB2_HDR_UID, tree->session->uid); SIVAL(req->out.body, 0x00, io->in.unknown1); - status = smb2_push_ofs_blob(req, req->out.body+0x04, path); + status = smb2_push_ofs_blob(&req->out, req->out.body+0x04, path); data_blob_free(&path); if (!NT_STATUS_IS_OK(status)) { talloc_free(req); -- cgit From e9eb56068573d89f8ce45f08220ca870b3daa669 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 16 Nov 2005 11:01:15 +0000 Subject: r11741: - the buffer code (first 2 bytes in the SMB2 body) seem to be the length of the fixed body part, and +1 if there's a dynamic part - there're 3 types of dynamic blobs with uint16_t offset/uint16_t size with uint16_t offset/uint32_t size with uint32_t offset/uint32_t size /* aligned to 8 bytes */ - strings are transmitted in UTF-16 with no termination and packet into a uint16/uint16 blob metze (This used to be commit 79103c51e5c752fbdb4d25a0047b65002828df89) --- source4/libcli/smb2/tcon.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'source4/libcli/smb2/tcon.c') diff --git a/source4/libcli/smb2/tcon.c b/source4/libcli/smb2/tcon.c index 5e53e11634..32ad05733e 100644 --- a/source4/libcli/smb2/tcon.c +++ b/source4/libcli/smb2/tcon.c @@ -53,21 +53,15 @@ struct smb2_request *smb2_tree_connect_send(struct smb2_tree *tree, { struct smb2_request *req; NTSTATUS status; - DATA_BLOB path; - status = smb2_string_blob(tree, io->in.path, &path); - if (!NT_STATUS_IS_OK(status)) { - return NULL; - } - req = smb2_request_init(tree->session->transport, SMB2_OP_TCON, - 0x8 + path.length); + 0x08, 1); if (req == NULL) return NULL; SBVAL(req->out.hdr, SMB2_HDR_UID, tree->session->uid); + SIVAL(req->out.body, 0x00, io->in.unknown1); - status = smb2_push_ofs_blob(&req->out, req->out.body+0x04, path); - data_blob_free(&path); + status = smb2_push_o16s16_string(&req->out, req->out.body+0x04, io->in.path); if (!NT_STATUS_IS_OK(status)) { talloc_free(req); return NULL; @@ -89,11 +83,7 @@ NTSTATUS smb2_tree_connect_recv(struct smb2_request *req, struct smb2_tree_conne return smb2_request_destroy(req); } - if (req->in.body_size < 0x10) { - return NT_STATUS_BUFFER_TOO_SMALL; - } - - SMB2_CHECK_BUFFER_CODE(req, 0x10); + SMB2_CHECK_PACKET_RECV(req, 0x10, False); io->out.tid = IVAL(req->in.hdr, SMB2_HDR_TID); -- cgit From fe996e8ac687dbf5b5cfdd795f14aed89663f06d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 17 Nov 2005 03:32:38 +0000 Subject: r11754: make the SMB2 blob push routines take offsets, so they fit better with the rest of the packet construction code (This used to be commit 387ec2b17ff30a1c040b460b498c8fa7d8770593) --- source4/libcli/smb2/tcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/smb2/tcon.c') diff --git a/source4/libcli/smb2/tcon.c b/source4/libcli/smb2/tcon.c index 32ad05733e..886ed9828b 100644 --- a/source4/libcli/smb2/tcon.c +++ b/source4/libcli/smb2/tcon.c @@ -61,7 +61,7 @@ struct smb2_request *smb2_tree_connect_send(struct smb2_tree *tree, SBVAL(req->out.hdr, SMB2_HDR_UID, tree->session->uid); SIVAL(req->out.body, 0x00, io->in.unknown1); - status = smb2_push_o16s16_string(&req->out, req->out.body+0x04, io->in.path); + status = smb2_push_o16s16_string(&req->out, 0x04, io->in.path); if (!NT_STATUS_IS_OK(status)) { talloc_free(req); return NULL; -- cgit From 28918cd0b0a091407f6e5be8396b363ffab87966 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 1 Dec 2005 07:09:24 +0000 Subject: r11996: don't overwrite the buffercode metze (This used to be commit fee5b6f40784e75a469320a584423c5030b69400) --- source4/libcli/smb2/tcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/smb2/tcon.c') diff --git a/source4/libcli/smb2/tcon.c b/source4/libcli/smb2/tcon.c index 886ed9828b..ddc4babeea 100644 --- a/source4/libcli/smb2/tcon.c +++ b/source4/libcli/smb2/tcon.c @@ -60,7 +60,7 @@ struct smb2_request *smb2_tree_connect_send(struct smb2_tree *tree, SBVAL(req->out.hdr, SMB2_HDR_UID, tree->session->uid); - SIVAL(req->out.body, 0x00, io->in.unknown1); + SSVAL(req->out.body, 0x02, io->in.unknown1); status = smb2_push_o16s16_string(&req->out, 0x04, io->in.path); if (!NT_STATUS_IS_OK(status)) { talloc_free(req); -- cgit From d4de4c2d210d2e8c9b5aedf70695594809ad6a0b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 30 Dec 2005 13:16:54 +0000 Subject: r12608: Remove some unused #include lines. (This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981) --- source4/libcli/smb2/tcon.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/libcli/smb2/tcon.c') diff --git a/source4/libcli/smb2/tcon.c b/source4/libcli/smb2/tcon.c index ddc4babeea..3fc14075a5 100644 --- a/source4/libcli/smb2/tcon.c +++ b/source4/libcli/smb2/tcon.c @@ -21,7 +21,6 @@ */ #include "includes.h" -#include "libcli/raw/libcliraw.h" #include "libcli/smb2/smb2.h" #include "libcli/smb2/smb2_calls.h" -- cgit From dc86ab3e454d7219608d01879145dec5609acaa3 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 11 May 2006 10:47:37 +0000 Subject: r15532: add a BOOL body_dynamic_present, because the body_dynamic_size can be 0 also if the dynamic flag should be set metze (This used to be commit 7829100e1ee79f4f5d24004af221288e19c09b3e) --- source4/libcli/smb2/tcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/smb2/tcon.c') diff --git a/source4/libcli/smb2/tcon.c b/source4/libcli/smb2/tcon.c index 3fc14075a5..8b94936c42 100644 --- a/source4/libcli/smb2/tcon.c +++ b/source4/libcli/smb2/tcon.c @@ -54,7 +54,7 @@ struct smb2_request *smb2_tree_connect_send(struct smb2_tree *tree, NTSTATUS status; req = smb2_request_init(tree->session->transport, SMB2_OP_TCON, - 0x08, 1); + 0x08, True, 0); if (req == NULL) return NULL; SBVAL(req->out.hdr, SMB2_HDR_UID, tree->session->uid); -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/libcli/smb2/tcon.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/libcli/smb2/tcon.c') diff --git a/source4/libcli/smb2/tcon.c b/source4/libcli/smb2/tcon.c index 8b94936c42..4f341d1206 100644 --- a/source4/libcli/smb2/tcon.c +++ b/source4/libcli/smb2/tcon.c @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -16,8 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #include "includes.h" -- cgit From 2151cde58014ea2e822c13d2f8a369b45dc19ca8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 6 Oct 2007 22:28:14 +0000 Subject: r25554: Convert last instances of BOOL, True and False to the standard types. (This used to be commit 566aa14139510788548a874e9213d91317f83ca9) --- source4/libcli/smb2/tcon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/libcli/smb2/tcon.c') diff --git a/source4/libcli/smb2/tcon.c b/source4/libcli/smb2/tcon.c index 4f341d1206..ad1ba4c92d 100644 --- a/source4/libcli/smb2/tcon.c +++ b/source4/libcli/smb2/tcon.c @@ -27,7 +27,7 @@ initialise a smb2_session structure */ struct smb2_tree *smb2_tree_init(struct smb2_session *session, - TALLOC_CTX *parent_ctx, BOOL primary) + TALLOC_CTX *parent_ctx, bool primary) { struct smb2_tree *tree; @@ -53,7 +53,7 @@ struct smb2_request *smb2_tree_connect_send(struct smb2_tree *tree, NTSTATUS status; req = smb2_request_init(tree->session->transport, SMB2_OP_TCON, - 0x08, True, 0); + 0x08, true, 0); if (req == NULL) return NULL; SBVAL(req->out.hdr, SMB2_HDR_UID, tree->session->uid); @@ -81,7 +81,7 @@ NTSTATUS smb2_tree_connect_recv(struct smb2_request *req, struct smb2_tree_conne return smb2_request_destroy(req); } - SMB2_CHECK_PACKET_RECV(req, 0x10, False); + SMB2_CHECK_PACKET_RECV(req, 0x10, false); io->out.tid = IVAL(req->in.hdr, SMB2_HDR_TID); -- cgit From a2505c5a2cc2b7b692ffbcdd8c6b86000a15d2c7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 12 Feb 2008 17:00:35 +1100 Subject: updated SMB2 header defines to match WSPP docs (This used to be commit d2c6ad55eca27f50a38fc6e2a85032eddb3f0aae) --- source4/libcli/smb2/tcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/smb2/tcon.c') diff --git a/source4/libcli/smb2/tcon.c b/source4/libcli/smb2/tcon.c index ad1ba4c92d..5a09970584 100644 --- a/source4/libcli/smb2/tcon.c +++ b/source4/libcli/smb2/tcon.c @@ -56,7 +56,7 @@ struct smb2_request *smb2_tree_connect_send(struct smb2_tree *tree, 0x08, true, 0); if (req == NULL) return NULL; - SBVAL(req->out.hdr, SMB2_HDR_UID, tree->session->uid); + SBVAL(req->out.hdr, SMB2_HDR_SESSION_ID, tree->session->uid); SSVAL(req->out.body, 0x02, io->in.unknown1); status = smb2_push_o16s16_string(&req->out, 0x04, io->in.path); -- cgit From e94d710b0b959d8e69eb02ef0704ebcff56485fb Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Feb 2008 10:13:28 +1100 Subject: updated SMB2 tcon as per WSPP docs (This used to be commit 5913e3e549e71affc66c28cacb6563331fb0c790) --- source4/libcli/smb2/tcon.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'source4/libcli/smb2/tcon.c') diff --git a/source4/libcli/smb2/tcon.c b/source4/libcli/smb2/tcon.c index 5a09970584..db35669d41 100644 --- a/source4/libcli/smb2/tcon.c +++ b/source4/libcli/smb2/tcon.c @@ -58,7 +58,7 @@ struct smb2_request *smb2_tree_connect_send(struct smb2_tree *tree, SBVAL(req->out.hdr, SMB2_HDR_SESSION_ID, tree->session->uid); - SSVAL(req->out.body, 0x02, io->in.unknown1); + SSVAL(req->out.body, 0x02, io->in.reserved); status = smb2_push_o16s16_string(&req->out, 0x04, io->in.path); if (!NT_STATUS_IS_OK(status)) { talloc_free(req); @@ -85,10 +85,18 @@ NTSTATUS smb2_tree_connect_recv(struct smb2_request *req, struct smb2_tree_conne io->out.tid = IVAL(req->in.hdr, SMB2_HDR_TID); - io->out.unknown1 = SVAL(req->in.body, 0x02); - io->out.unknown2 = IVAL(req->in.body, 0x04); - io->out.unknown3 = IVAL(req->in.body, 0x08); + io->out.share_type = CVAL(req->in.body, 0x02); + io->out.reserved = CVAL(req->in.body, 0x03); + io->out.flags = IVAL(req->in.body, 0x04); + io->out.capabilities= IVAL(req->in.body, 0x08); io->out.access_mask = IVAL(req->in.body, 0x0C); + + if (io->out.capabilities & ~SMB2_CAP_ALL) { + DEBUG(0,("Unknown capabilities mask 0x%x\n", io->out.capabilities)); + } + if (io->out.flags & ~SMB2_SHAREFLAG_ALL) { + DEBUG(0,("Unknown tcon shareflag 0x%x\n", io->out.flags)); + } return smb2_request_destroy(req); } -- cgit From 1c33953ae21384f04de11539afaf9ead5e413b96 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 7 Jun 2008 08:30:51 -0700 Subject: make signing per session in the SMB2 client library Thanks to Metze for spotting this (This used to be commit e9fd9b821c04d1cb7b574f539dd8169611e662aa) --- source4/libcli/smb2/tcon.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/libcli/smb2/tcon.c') diff --git a/source4/libcli/smb2/tcon.c b/source4/libcli/smb2/tcon.c index db35669d41..ec7152b264 100644 --- a/source4/libcli/smb2/tcon.c +++ b/source4/libcli/smb2/tcon.c @@ -57,6 +57,7 @@ struct smb2_request *smb2_tree_connect_send(struct smb2_tree *tree, if (req == NULL) return NULL; SBVAL(req->out.hdr, SMB2_HDR_SESSION_ID, tree->session->uid); + req->session = tree->session; SSVAL(req->out.body, 0x02, io->in.reserved); status = smb2_push_o16s16_string(&req->out, 0x04, io->in.path); -- cgit