diff options
author | Volker Lendecke <vlendec@samba.org> | 2003-11-27 17:31:18 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2003-11-27 17:31:18 +0000 |
commit | d5775b7106dc5d6326db89f7369d2ffd61646426 (patch) | |
tree | 3f38fc14ee13ab8391ea8ba9f560f0e1cc5b0642 | |
parent | 41e4b036dff0af7be69bf95ea3d64dfccd3a4b8e (diff) | |
download | samba-d5775b7106dc5d6326db89f7369d2ffd61646426.tar.gz samba-d5775b7106dc5d6326db89f7369d2ffd61646426.tar.xz samba-d5775b7106dc5d6326db89f7369d2ffd61646426.zip |
Only ask for 512 names at a time.
Volker
-rw-r--r-- | source/utils/net_rpc.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/source/utils/net_rpc.c b/source/utils/net_rpc.c index af575d95853..2453355ee3d 100644 --- a/source/utils/net_rpc.c +++ b/source/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; |