svn commit: samba r3599 - in branches/SAMBA_4_0/source: auth rpc_server/netlogon

tridge at samba.org tridge at samba.org
Sun Nov 7 12:40:10 GMT 2004


Author: tridge
Date: 2004-11-07 12:40:07 +0000 (Sun, 07 Nov 2004)
New Revision: 3599

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=3599

Log:
fixed a couple of memory errors in the rpc netlogon server
(found with valgrind)

Modified:
   branches/SAMBA_4_0/source/auth/ntlm_check.c
   branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c


Changeset:
Modified: branches/SAMBA_4_0/source/auth/ntlm_check.c
===================================================================
--- branches/SAMBA_4_0/source/auth/ntlm_check.c	2004-11-07 10:34:35 UTC (rev 3598)
+++ branches/SAMBA_4_0/source/auth/ntlm_check.c	2004-11-07 12:40:07 UTC (rev 3599)
@@ -187,6 +187,13 @@
 			 username));
 	}
 
+	if (lm_sess_key) {
+		*lm_sess_key = data_blob(NULL, 0);
+	}
+	if (user_sess_key) {
+		*user_sess_key = data_blob(NULL, 0);
+	}
+
 	if (nt_interactive_password && nt_interactive_password->length && nt_pw) { 
 		if (nt_interactive_password->length != 16) {
 			DEBUG(3,("ntlm_password_check: Interactive logon: Invalid NT password length (%d) supplied for user %s\n", (int)nt_interactive_password->length,

Modified: branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c	2004-11-07 10:34:35 UTC (rev 3598)
+++ branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c	2004-11-07 12:40:07 UTC (rev 3599)
@@ -548,11 +548,12 @@
 						      mem_ctx,
 						      &server_info);
 
+	/* keep the auth_context for the life of this call */
+	talloc_steal(dce_call, auth_context);
+
 	if (!NT_STATUS_IS_OK(nt_status)) {
-		free_auth_context(&auth_context);
 		return nt_status;
 	}
-	free_auth_context(&auth_context);
 
 	sam = talloc_p(mem_ctx, struct netr_SamBaseInfo);
 



More information about the samba-cvs mailing list