diff options
author | Günther Deschner <gd@samba.org> | 2006-09-21 22:44:32 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:00:59 -0500 |
commit | 1b7b6e54db63ec1faceaeb58b9df0627a5992806 (patch) | |
tree | a9dc8e5e7480114877acfda6ceed3cd2c35b40fe /source3/rpc_client | |
parent | a734e98b516aec012ee2a9c866eb6debe663d14e (diff) | |
download | samba-1b7b6e54db63ec1faceaeb58b9df0627a5992806.tar.gz samba-1b7b6e54db63ec1faceaeb58b9df0627a5992806.tar.bz2 samba-1b7b6e54db63ec1faceaeb58b9df0627a5992806.zip |
r18799: Prepare query_disp_info to use the next idx from the last result entry
for the enumeration loop (following msdn docs of that call).
Guenther
(This used to be commit 138a921f82a02991eed7ab7d958ec7ea78608684)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_samr.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index fceafeca85..1ea1d33ffc 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -1424,6 +1424,24 @@ void get_query_dispinfo_params(int loop_count, uint32 *max_entries, /* Query display info */ +static uint32 get_next_idx(SAMR_R_QUERY_DISPINFO *r) +{ + switch (r->switch_level) { + case 1: + return r->ctr->sam.info1->sam[r->num_entries-1].user_idx; + case 2: + return r->ctr->sam.info2->sam[r->num_entries-1].user_idx; + case 3: + return r->ctr->sam.info3->sam[r->num_entries-1].grp_idx; + case 4: + return r->ctr->sam.info4->sam[r->num_entries-1].user_idx; + case 5: + return r->ctr->sam.info5->sam[r->num_entries-1].grp_idx; + default: + return 0; + } +} + NTSTATUS rpccli_samr_query_dispinfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *domain_pol, uint32 *start_idx, |