summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_rpc.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index af575d9585..2453355ee3 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -1125,16 +1125,27 @@ rpc_group_members_internals(const DOM_SID *domain_sid, struct cli_state *cli,
if (!NT_STATUS_IS_OK(result))
goto done;
- result = cli_samr_lookup_rids(cli, mem_ctx, &domain_pol, 1000,
- num_members, group_rids,
- &num_names, &names, &name_types);
+ do {
+ int this_time = 512;
- if (!NT_STATUS_IS_OK(result))
- goto done;
+ if (num_members < this_time)
+ this_time = num_members;
- for (i = 0; i < num_members; i++) {
- printf("%s\n", names[i]);
- }
+ result = cli_samr_lookup_rids(cli, mem_ctx, &domain_pol, 1000,
+ this_time, group_rids,
+ &num_names, &names, &name_types);
+
+ if (!NT_STATUS_IS_OK(result))
+ goto done;
+
+ for (i = 0; i < this_time; i++) {
+ printf("%s\n", names[i]);
+ }
+
+ num_members -= this_time;
+ group_rids += 512;
+
+ } while (num_members > 0);
done:
return result;