diff options
author | Volker Lendecke <vlendec@samba.org> | 2005-01-15 09:15:28 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:54 -0500 |
commit | 4bbfebe61255ad4c87e2ded8723bfcaab5c1fdf2 (patch) | |
tree | f34cabbf143c6f5e16292538dc930bcd8c19b074 /source3/rpc_client | |
parent | 0663235de98d7f564a2ec7cea4f63b9d2754670f (diff) | |
download | samba-4bbfebe61255ad4c87e2ded8723bfcaab5c1fdf2.tar.gz samba-4bbfebe61255ad4c87e2ded8723bfcaab5c1fdf2.tar.bz2 samba-4bbfebe61255ad4c87e2ded8723bfcaab5c1fdf2.zip |
r4750: Fix cli_samr_queryuseraliases. There can be more than one sid, thus more than
one pointer...
Volker
(This used to be commit f2f08b64a53f6efd3154ff2656ecacc86872a18c)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_samr.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index 6b6a68059c..bec94ce7a5 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -698,7 +698,8 @@ NTSTATUS cli_samr_query_useraliases(struct cli_state *cli, TALLOC_CTX *mem_ctx, 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 @@ NTSTATUS cli_samr_query_useraliases(struct cli_state *cli, TALLOC_CTX *mem_ctx, 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)) |