svn commit: samba r3075 - in branches/SAMBA_4_0/source: libcli/auth librpc/rpc

abartlet at samba.org abartlet at samba.org
Wed Oct 20 02:10:47 GMT 2004


Author: abartlet
Date: 2004-10-20 02:10:46 +0000 (Wed, 20 Oct 2004)
New Revision: 3075

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source&rev=3075&nolog=1

Log:
Initialise (and check for intialisation) of the private pointer to
ensure we don't segfault on the cleanup from an incomplete schannel
bind.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/libcli/auth/schannel.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_schannel.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/auth/schannel.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/auth/schannel.c	2004-10-20 02:08:36 UTC (rev 3074)
+++ branches/SAMBA_4_0/source/libcli/auth/schannel.c	2004-10-20 02:10:46 UTC (rev 3075)
@@ -278,8 +278,10 @@
  */
 void schannel_end(struct schannel_state **state)
 {
-	talloc_destroy((*state)->mem_ctx);
-	(*state) = NULL;
+	if (*state) {
+		talloc_destroy((*state)->mem_ctx);
+		(*state) = NULL;
+	}
 }
 
 /*

Modified: branches/SAMBA_4_0/source/librpc/rpc/dcerpc_schannel.c
===================================================================
--- branches/SAMBA_4_0/source/librpc/rpc/dcerpc_schannel.c	2004-10-20 02:08:36 UTC (rev 3074)
+++ branches/SAMBA_4_0/source/librpc/rpc/dcerpc_schannel.c	2004-10-20 02:10:46 UTC (rev 3075)
@@ -279,9 +279,13 @@
 static NTSTATUS dcerpc_schannel_server_start(struct gensec_security *gensec_security) 
 {
 	NTSTATUS status;
+	struct dcerpc_schannel_state *dce_schan_state;
 
 	status = dcerpc_schannel_start(gensec_security);
 
+	dce_schan_state = gensec_security->private_data;
+	dce_schan_state->schannel_state = NULL;
+
 	if (!NT_STATUS_IS_OK(status)) {
 		return status;
 	}



More information about the samba-cvs mailing list