[SCM] Samba Shared Repository - branch master updated

Simo Sorce idra at samba.org
Wed Jul 7 21:50:59 MDT 2010


The branch, master has been updated
       via  f0b9184... s3:winbindd_samr Do not use static contexts
      from  90b1a1d... s3: Add SMB2 performance counters.

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


- Log -----------------------------------------------------------------
commit f0b918473db75ff389a7d2e3bf4a069b8b30d141
Author: Simo Sorce <idra at samba.org>
Date:   Wed Jul 7 23:43:47 2010 -0400

    s3:winbindd_samr Do not use static contexts
    
    It is a very bad idea to use a static context within the open function.
    Use the memory hierarchy to keep track of a client connection.

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

Summary of changes:
 source3/winbindd/winbindd_samr.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_samr.c b/source3/winbindd/winbindd_samr.c
index f8004d9..a2865a0 100644
--- a/source3/winbindd/winbindd_samr.c
+++ b/source3/winbindd/winbindd_samr.c
@@ -40,7 +40,7 @@
 static NTSTATUS open_internal_samr_pipe(TALLOC_CTX *mem_ctx,
 					struct rpc_pipe_client **samr_pipe)
 {
-	static struct rpc_pipe_client *cli = NULL;
+	struct rpc_pipe_client *cli = NULL;
 	struct auth_serversupplied_info *server_info = NULL;
 	NTSTATUS status;
 
@@ -58,7 +58,7 @@ static NTSTATUS open_internal_samr_pipe(TALLOC_CTX *mem_ctx,
 	}
 
 	/* create a samr connection */
-	status = rpc_pipe_open_internal(talloc_autofree_context(),
+	status = rpc_pipe_open_internal(mem_ctx,
 					&ndr_table_samr.syntax_id,
 					rpc_samr_dispatch,
 					server_info,
@@ -112,7 +112,7 @@ NTSTATUS open_internal_samr_conn(TALLOC_CTX *mem_ctx,
 static NTSTATUS open_internal_lsa_pipe(TALLOC_CTX *mem_ctx,
 				       struct rpc_pipe_client **lsa_pipe)
 {
-	static struct rpc_pipe_client *cli = NULL;
+	struct rpc_pipe_client *cli = NULL;
 	struct auth_serversupplied_info *server_info = NULL;
 	NTSTATUS status;
 
@@ -130,7 +130,7 @@ static NTSTATUS open_internal_lsa_pipe(TALLOC_CTX *mem_ctx,
 	}
 
 	/* create a samr connection */
-	status = rpc_pipe_open_internal(talloc_autofree_context(),
+	status = rpc_pipe_open_internal(mem_ctx,
 					&ndr_table_lsarpc.syntax_id,
 					rpc_lsarpc_dispatch,
 					server_info,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list