summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-11-27 17:32:13 +0000
committerVolker Lendecke <vlendec@samba.org>2003-11-27 17:32:13 +0000
commit2385a310d33dad825d4489e7cb7a8b1e79ec0073 (patch)
treed7aff57281af6dd6c78791e1c6ccfad00fc6b3b8
parent8ac22d6944c366f806253bf905567884feb709e4 (diff)
downloadsamba-2385a310d33dad825d4489e7cb7a8b1e79ec0073.tar.gz
samba-2385a310d33dad825d4489e7cb7a8b1e79ec0073.tar.bz2
samba-2385a310d33dad825d4489e7cb7a8b1e79ec0073.zip
Only ask for 512 names at a time.
Volker (This used to be commit 73cdf724e90d76e97895ae5b1326825bb59bf90e)
-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;