summaryrefslogtreecommitdiff
path: root/source3/smbd/smb2_tcon.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-01-18 12:38:14 -0800
committerJeremy Allison <jra@samba.org>2012-01-18 23:14:32 +0100
commit39c627b60754bd89c419b2d7e32d32c7a9af5a11 (patch)
treece48972e05502e079aabcfa24164714200b70e6e /source3/smbd/smb2_tcon.c
parent6d141282424f1eb62ee225a32e376162b773e7a8 (diff)
downloadsamba-39c627b60754bd89c419b2d7e32d32c7a9af5a11.tar.gz
samba-39c627b60754bd89c419b2d7e32d32c7a9af5a11.tar.bz2
samba-39c627b60754bd89c419b2d7e32d32c7a9af5a11.zip
Fix bug 8710 - connections.tdb - major leak with SMB2.
Ensure the cnum used to claim the connection for SMB2 is the id that will be used for the SMB2 tcon. Based on code from Ira Cooper <ira@wakeful.net>. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Jan 18 23:14:32 CET 2012 on sn-devel-104
Diffstat (limited to 'source3/smbd/smb2_tcon.c')
-rw-r--r--source3/smbd/smb2_tcon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/smb2_tcon.c b/source3/smbd/smb2_tcon.c
index 4c0544fba2..b7e5ce0877 100644
--- a/source3/smbd/smb2_tcon.c
+++ b/source3/smbd/smb2_tcon.c
@@ -229,8 +229,9 @@ static NTSTATUS smbd_smb2_tree_connect(struct smbd_smb2_request *req,
tcon->session->sconn->num_tcons_open++;
talloc_set_destructor(tcon, smbd_smb2_tcon_destructor);
- compat_conn = make_connection_snum(req->sconn,
- snum, req->session->compat_vuser,
+ compat_conn = make_connection_smb2(req->sconn,
+ tcon,
+ req->session->compat_vuser,
data_blob_null, "???",
&status);
if (compat_conn == NULL) {
@@ -238,7 +239,6 @@ static NTSTATUS smbd_smb2_tree_connect(struct smbd_smb2_request *req,
return status;
}
tcon->compat_conn = talloc_move(tcon, &compat_conn);
- tcon->compat_conn->cnum = tcon->tid;
if (IS_PRINT(tcon->compat_conn)) {
*out_share_type = SMB2_SHARE_TYPE_PRINT;