diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-12-06 17:59:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:09 -0500 |
commit | 273f340376452bd072b68d0601dde3f7b43b62db (patch) | |
tree | d62e422cedc3ab2fbcd67697db3cb4b5a4fa8c0d /source4/smb_server/smb2 | |
parent | 2184ad5af7f354dfb5f8addcb99e69fa2f79df01 (diff) | |
download | samba-273f340376452bd072b68d0601dde3f7b43b62db.tar.gz samba-273f340376452bd072b68d0601dde3f7b43b62db.tar.bz2 samba-273f340376452bd072b68d0601dde3f7b43b62db.zip |
r12102: for SMB2 we need to allocate tcons per session
metze
(This used to be commit 4d527ac005086c2db954578b4126ca128e436e01)
Diffstat (limited to 'source4/smb_server/smb2')
-rw-r--r-- | source4/smb_server/smb2/receive.c | 5 | ||||
-rw-r--r-- | source4/smb_server/smb2/sesssetup.c | 5 | ||||
-rw-r--r-- | source4/smb_server/smb2/tcon.c | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/source4/smb_server/smb2/receive.c b/source4/smb_server/smb2/receive.c index 66ebe162cf..310ded5355 100644 --- a/source4/smb_server/smb2/receive.c +++ b/source4/smb_server/smb2/receive.c @@ -129,7 +129,7 @@ static NTSTATUS smb2srv_reply(struct smb2srv_request *req) uid = BVAL(req->in.hdr, SMB2_HDR_UID); req->session = smbsrv_session_find(req->smb_conn, uid); - req->tcon = smbsrv_tcon_find(req->smb_conn, tid); + req->tcon = smbsrv_smb2_tcon_find(req->session, tid); errno = 0; @@ -322,9 +322,6 @@ NTSTATUS smbsrv_init_smb2_connection(struct smbsrv_connection *smb_conn) status = smbsrv_init_sessions(smb_conn, UINT64_MAX); NT_STATUS_NOT_OK_RETURN(status); - status = smbsrv_init_tcons(smb_conn, UINT32_MAX); - NT_STATUS_NOT_OK_RETURN(status); - return NT_STATUS_OK; } diff --git a/source4/smb_server/smb2/sesssetup.c b/source4/smb_server/smb2/sesssetup.c index 7915590464..288671ddd3 100644 --- a/source4/smb_server/smb2/sesssetup.c +++ b/source4/smb_server/smb2/sesssetup.c @@ -67,6 +67,11 @@ static NTSTATUS smb2srv_sesssetup_backend(struct smb2srv_request *req, struct sm /* allocate a new session */ smb_sess = smbsrv_session_new(req->smb_conn, gensec_ctx); + status = smbsrv_smb2_init_tcons(smb_sess); + if (!NT_STATUS_IS_OK(status)) { + talloc_free(smb_sess); + smb_sess = NULL; + } } else { /* lookup an existing session */ smb_sess = smbsrv_session_find_sesssetup(req->smb_conn, vuid); diff --git a/source4/smb_server/smb2/tcon.c b/source4/smb_server/smb2/tcon.c index fb84aa6fdc..9fb2a03ce3 100644 --- a/source4/smb_server/smb2/tcon.c +++ b/source4/smb_server/smb2/tcon.c @@ -28,7 +28,7 @@ static NTSTATUS smb2srv_tcon_backend(struct smb2srv_request *req, struct smb2_tr { struct smbsrv_tcon *tcon; - tcon = smbsrv_tcon_new(req->smb_conn); + tcon = smbsrv_smb2_tcon_new(req->session); NT_STATUS_HAVE_NO_MEMORY(tcon); /* TODO: do real tree connect */ |