summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-11-27 17:31:18 +0000
committerVolker Lendecke <vlendec@samba.org>2003-11-27 17:31:18 +0000
commitdd51a9be946a55a1a402a6d4e744214229453d93 (patch)
treef3989f90913fcafee8f65a26a64b539b0518fcfb /source3
parent20d03cc862a73c80450d0c9be565bf58c22a8db4 (diff)
downloadsamba-dd51a9be946a55a1a402a6d4e744214229453d93.tar.gz
samba-dd51a9be946a55a1a402a6d4e744214229453d93.tar.bz2
samba-dd51a9be946a55a1a402a6d4e744214229453d93.zip
Only ask for 512 names at a time.
Volker (This used to be commit d5775b7106dc5d6326db89f7369d2ffd61646426)
Diffstat (limited to 'source3')
-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;