[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Fri May 7 07:55:50 MDT 2010


The branch, master has been updated
       via  31b1262... When tearing down the connection make sure we close all files before freeing the global context, as we close access to the locking db before freeing the global context.
      from  adf4833... This patch looks bigger than it is. It does 2 things. 1). Renames smbpid -> smblctx in our locking code. 2). Widens smblctx to 64-bits internally. Preparing to use the SMB2 handle as the locking context.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 31b12622cf87dc6f7263550120973b6c56e17ba4
Author: Jeremy Allison <jra at samba.org>
Date:   Fri May 7 06:54:16 2010 -0700

    When tearing down the connection make sure we close all files before
    freeing the global context, as we close access to the locking db
    before freeing the global context.
    
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/conn.c      |    7 +++++++
 source3/smbd/smb2_tcon.c |    1 +
 2 files changed, 8 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c
index 803a775..afb7a7f 100644
--- a/source3/smbd/conn.c
+++ b/source3/smbd/conn.c
@@ -181,6 +181,13 @@ bool conn_close_all(struct smbd_server_connection *sconn)
 		/* SMB2 */
 		if (sconn->smb2.sessions.list &&
 				sconn->smb2.sessions.list->tcons.list) {
+			struct smbd_smb2_tcon *tcon, *tc_next;
+
+			for (tcon = sconn->smb2.sessions.list->tcons.list;
+					tcon; tcon = tc_next) {
+				tc_next = tcon->next;
+				TALLOC_FREE(tcon);
+			}
 			return true;
 		}
 		return false;
diff --git a/source3/smbd/smb2_tcon.c b/source3/smbd/smb2_tcon.c
index 0f765d6..084ded9 100644
--- a/source3/smbd/smb2_tcon.c
+++ b/source3/smbd/smb2_tcon.c
@@ -128,6 +128,7 @@ static int smbd_smb2_tcon_destructor(struct smbd_smb2_tcon *tcon)
 	DLIST_REMOVE(tcon->session->tcons.list, tcon);
 
 	if (tcon->compat_conn) {
+		set_current_service(tcon->compat_conn, 0, true);
 		close_cnum(tcon->compat_conn, tcon->session->vuid);
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list