svn commit: samba r17192 - in branches/SAMBA_3_0/source/rpc_server: .

vlendec at samba.org vlendec at samba.org
Sat Jul 22 19:44:18 GMT 2006


Author: vlendec
Date: 2006-07-22 19:44:17 +0000 (Sat, 22 Jul 2006)
New Revision: 17192

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

Log:
Make this actually survive valgrind. We NEED pidl here...

Maybe bzr is not such a bad idea, then you would probably see less spam on
samba-cvs, sorry for that... :-)

Volker

Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c	2006-07-22 19:34:10 UTC (rev 17191)
+++ branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c	2006-07-22 19:44:17 UTC (rev 17192)
@@ -1015,8 +1015,8 @@
 			  LSA_R_LOOKUP_SIDS3 *r_u)
 {
 	uint32 mapped_count = 0;
-	DOM_R_REF ref;
-	LSA_TRANS_NAME_ENUM2 names;
+	DOM_R_REF *ref;
+	LSA_TRANS_NAME_ENUM2 *names;
 
 	if ((q_u->level < 1) || (q_u->level > 6)) {
 		return NT_STATUS_INVALID_PARAMETER;
@@ -1024,9 +1024,16 @@
 
 	r_u->status = NT_STATUS_RPC_PROTSEQ_NOT_SUPPORTED;
 
-	ZERO_STRUCT(ref);
-	ZERO_STRUCT(names);
-	init_reply_lookup_sids3(r_u, &ref, &names, mapped_count);
+	ref = TALLOC_ZERO_P(p->mem_ctx, DOM_R_REF);
+	names = TALLOC_ZERO_P(p->mem_ctx, LSA_TRANS_NAME_ENUM2);
+
+	if ((ref == NULL) || (names == NULL)) {
+		/* We would segfault later on in lsa_io_r_lookup_sids3 anyway,
+		 * so do a planned exit here. We NEEEED pidl! */
+		smb_panic("talloc failed");
+	}
+
+	init_reply_lookup_sids3(r_u, ref, names, mapped_count);
 	return r_u->status;
 }
 



More information about the samba-cvs mailing list