svn commit: samba r4750 - in branches/SAMBA_3_0/source/rpc_client: .

vlendec at samba.org vlendec at samba.org
Sat Jan 15 09:15:29 GMT 2005


Author: vlendec
Date: 2005-01-15 09:15:28 +0000 (Sat, 15 Jan 2005)
New Revision: 4750

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

Log:
Fix cli_samr_queryuseraliases. There can be more than one sid, thus more than
one pointer...

Volker

Modified:
   branches/SAMBA_3_0/source/rpc_client/cli_samr.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_client/cli_samr.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_client/cli_samr.c	2005-01-15 09:10:47 UTC (rev 4749)
+++ branches/SAMBA_3_0/source/rpc_client/cli_samr.c	2005-01-15 09:15:28 UTC (rev 4750)
@@ -698,7 +698,8 @@
 	SAMR_Q_QUERY_USERALIASES q;
 	SAMR_R_QUERY_USERALIASES r;
 	NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
-	unsigned int ptr=1;
+	int i;
+	uint32 *sid_ptrs;
 	
 	DEBUG(10,("cli_samr_query_useraliases\n"));
 
@@ -710,9 +711,16 @@
 	prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
 	prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);
 
+	sid_ptrs = TALLOC_ARRAY(mem_ctx, uint32, num_sids);
+	if (sid_ptrs == NULL)
+		return NT_STATUS_NO_MEMORY;
+
+	for (i=0; i<num_sids; i++)
+		sid_ptrs[i] = 1;
+
 	/* Marshall data and send request */
 
-	init_samr_q_query_useraliases(&q, user_pol, num_sids, &ptr, sid);
+	init_samr_q_query_useraliases(&q, user_pol, num_sids, sid_ptrs, sid);
 
 	if (!samr_io_q_query_useraliases("", &q, &qbuf, 0) ||
 	    !rpc_api_pipe_req(cli, PI_SAMR, SAMR_QUERY_USERALIASES, &qbuf, &rbuf))



More information about the samba-cvs mailing list